Brian Dunning wrote:

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

$mail_to = "$first_name $last_name <$email>";

On Windows Platform, You cannot use the TO address in the form "Name <address>" As it fails because the mail() function sends incorrect RCPTO headers to the SMTP server.


Just send the mail with the TO, CC and BCC adresses in the form "[EMAIL PROTECTED]". On Windows, your vars must be: $mailto = $email and nothing more (No name and no less or greather signs, just an email address).

Take a look at PHP Bug #28038 http://bugs.php.net/bug.php?id=28038
... and make your vote to have it solved in some future version ;)

Regards.
Jordi Canals

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



Reply via email to