Developing on a Windows server to be deployed on Linux. I get "SMTP server response: 501 Bad address syntax." Here's my code:

$mail_from = 'My Name <[EMAIL PROTECTED]>';
$mail_server = 'mail.servername.com'; // This is hosted externally
ini_set("SMTP", $mail_server);
ini_set("sendmail_from", $mail_from);
$mail_to = "$first_name $last_name <$email>";
mail($mail_to, "Here is my subject", "Please click this link to activate your account:\n\n$http_root"."owner.php?id=$entry_code", "To: $mail_to\nFrom: $mail_from\nContent-type: text/plain\nMailer: PHP/".phpversion());


I read about trying \r\n instead of \n in the headers, but it didn't seem to make any difference, and \n is working on other mail actions on this same server.

Thanks for any clues...  :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to