Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > email authentication
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 3rd November 01:54
afan
External User
 
Posts: 1
Default email authentication



Hi,
I have to develop a little registration form.
after the form is submitted confirmation email has to be sent to registrant.

I use this function to send an email:

function send_plain_email($to, $subject, $body)
{
$headers = "MIME-Versin: 1.0\n" . "Content-type: text/plain;
charset=ISO-8859-1; format=flowed\n" . "Content-Transfer-Encoding: 8bit\n" .
"Reply-To: Registration <registration@mydomain.com>\n".
"From: Registration <registration@mydomain.com>\n" .
"X-Mailer: PHP" . phpversion();

mail($to, $subject, $body, $headers) or die(mysql_errno());
}

Though, I'm getting the following error:

Warning: mail() [function.mail]: SMTP server response: 503 This mail
server requires authentication when attempting to send to a non-local
e-mail address. Please check your mail client settings or contact your
administrator to verify that the domain or address is defined for this
server. in
D:\Sites\CWIPanel\Accounts\mydomain.com\wwwroot\re servation.php on line 34

Never get such a error using LAMP.

Thanks for any help,
-afan
  Reply With Quote


 


2 3rd November 01:54
stuttle
External User
 
Posts: 1
Default email authentication



I'm assuming from that comment that you're running this under Windows of
some variety? This is not a PHP problem. The mail server PHP is
configured to use (see php.ini) requires authentication. The built-in
mail function doesn't support that so you'll need to use something like
PHPMailer (Google for it).

-Stut

--
http://stut.net/
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666