Re: Why do I keep getting a 501 mail error?

From: Date: Thu, 05 Aug 2004 22:57:32 +0000
Subject: Re: Why do I keep getting a 501 mail error?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192943@lists.php.net to get a copy of this message
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 "user@example.com". 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

« previous php.general (#192943) next »