Closed Thread Icon

Topic awaiting preservation: PHP sendmail authentication? (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=12907" title="Pages that link to Topic awaiting preservation: PHP sendmail authentication? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: PHP sendmail authentication? <span class="small">(Page 1 of 1)</span>\

 
H][RO
Bipolar (III) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-26-2003 09:11

Heyas all... i've been forced to change webhosts since my current one has been stuffing me around so much and now my sendmail script that used to work - gives me an error:

Warning: mail(): SMTP server response: 503 This mail server requires authentication. Please check your mail client settings. in d:\domains\vicsearch.com\wwwroot\Enquiry.php on line 411
Failed!

I guess i need some sort of authentication which for some reason i didnt before.. Anyone know what i need to include in the code for this, or is it an issue with the host? Thanks all.


Line 411: if(mail($to_address, $subject, $message, $headers))
{its ok etcc..}


[This message has been edited by H][RO (edited 09-26-2003).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 09-26-2003 09:33

You need to ask your web host for details how to connect to their mail server...


H][RO
Bipolar (III) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-26-2003 10:17

Ahh ok cool, was hoping it would all just transfer over and work ... never happens i guess..

I checked the php info of them both tho and they seem to have sendmail enabled and set the same. I guess ill have to ask them, thanks max.

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 09-26-2003 10:55

Some SMTP mail servers require you to provide your username and password before you can send mail through them (a good system for preventing spam in my opinion). A 503 server error is an authentication error, so your script needs to provide this information to the server when it tries to send the mail.

From php->mail()

mail() doesn't contain any method for you to mail using a server that requires authentication. Your host may have another server for you to use that doesn't require authentication, but then again they probably won't. PHP does not currnetly support sending email through SMTP servers with authentication, unless you want ot write a function for it yourself, and I'm not sure how such a function would be structured.

H][RO
Bipolar (III) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-26-2003 11:29

Damn, seems your right - for spam reasons etc they dont want to do it. Is there any other way i can send mail from forms etc using php? surely there must be..

H][RO
Bipolar (III) Inmate

From: Australia
Insane since: Oct 2002

posted posted 09-27-2003 02:45

Ok not too worry! My host fixed things up for me and enabled it, changed a few ports around and it works great. Finally its great to find a webhost with top quality service (sure im paying 8x more) but hey its work it . Thanks for your help guys.

« BackwardsOnwards »

Show Forum Drop Down Menu