Re: Why do I keep getting a 501 mail error?
| From: | Justin Patrin | Date: | Fri, 06 Aug 2004 00:00:50 +0000 |
| Subject: | Re: Why do I keep getting a 501 mail error? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192947@lists.php.net to get a copy of this message | ||
On Fri, 06 Aug 2004 00:57:32 +0200, Jordi Canals <jordi@jcanals.net> wrote:
> 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 ;)
>
I put a patch in that bug report that *should* fix it. It's not tested
at all, though. If someone can test it, please do:
http://bugs.php.net/bug.php?id=28038
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--