#22317 [Fbk->Opn]: mail() has address parsing problems
ID: 22317 User updated by: mark at virtualcreations dot com dot au Reported By: mark at virtualcreations dot com dot au -Status: Feedback +Status: Open Bug Type: Mail related Operating System: Win32 PHP Version: 4.3.0 New Comment: Well, the SMTP server is the one I use through my ISP (mail-bpa.bigpond.com). But because of your comments, I tried another SMTP server (mail.virtualcreations.com.au), and it worked better, but still not perfectly. Sending to two recipients (separated by commas) worked fine this time, but sending to "Mark <[EMAIL PROTECTED]>" had a problem. The SMTP server sent the message, but it bounced, with the following reason: Remote host said: 550 5.1.1 <"Mark ... User unknown (but that is a perfectly valid address, of course). Then I tried a THIRD SMTP server (smtp.zipworld.com.au), and everything worked perfectly. So, clearly all SMTP servers are different, but I would hope that the Win32 version of the mail() sending function would work with as many as possible of them. I reiterate what I said before: Before version 4.3.0, this worked perfectly, and I've never had any problems with the Linux version. Mark. Previous Comments: [2003-02-24 05:20:42] [EMAIL PROTECTED] so your SMTP server doesn't accept this syntax. What kind of SMTP server is that? Is there any way you can capture what php is sending out to the server? -------- [2003-02-20 02:22:49] mark at virtualcreations dot com dot au Thanks for the suggestion. I put the error reporting code in, and now have more information to share: When I tried: mail("[EMAIL PROTECTED], [EMAIL PROTECTED]", "My Subject", "Line 1") I got the response: Warning: mail() [function.mail]: SMTP server response: 501 unacceptable characters in local-part in index.php on line 5 I think the "unacceptable characters" refers to the space after the comma and before the "[EMAIL PROTECTED]". Then I tried: mail("Fred <[EMAIL PROTECTED]>", "My Subject", "Line 1") and got the response: Warning: mail() [function.mail]: SMTP server response: 501 illegal address syntax in index.php on line 5 But this same line of code works fine in Linux, and used to work fine in Win32 4.2.3 Mark. [2003-02-20 01:39:10] [EMAIL PROTECTED] These work just fine for me. Do you get any error messages? (put error_reporting(E_ALL); into your script) ---------------- [2003-02-20 00:48:58] mark at virtualcreations dot com dot au Thanks for the reply, but that made no difference whatsoever. (installed the Win32 version, and restarted Apache. It definitely installed correctly because phpinfo() showed version 4.3.2-dev) [2003-02-20 00:26:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22317 -- Edit this bug report at http://bugs.php.net/?id=22317&edit=1
#22317 [Fbk->Opn]: mail() has address parsing problems
ID: 22317 User updated by: mark at virtualcreations dot com dot au Reported By: mark at virtualcreations dot com dot au -Status: Feedback +Status: Open Bug Type: Mail related Operating System: Win32 PHP Version: 4.3.0 New Comment: Thanks for the suggestion. I put the error reporting code in, and now have more information to share: When I tried: mail("[EMAIL PROTECTED], [EMAIL PROTECTED]", "My Subject", "Line 1") I got the response: Warning: mail() [function.mail]: SMTP server response: 501 unacceptable characters in local-part in index.php on line 5 I think the "unacceptable characters" refers to the space after the comma and before the "[EMAIL PROTECTED]". Then I tried: mail("Fred <[EMAIL PROTECTED]>", "My Subject", "Line 1") and got the response: Warning: mail() [function.mail]: SMTP server response: 501 illegal address syntax in index.php on line 5 But this same line of code works fine in Linux, and used to work fine in Win32 4.2.3 Mark. Previous Comments: [2003-02-20 01:39:10] [EMAIL PROTECTED] These work just fine for me. Do you get any error messages? (put error_reporting(E_ALL); into your script) ------------------------ [2003-02-20 00:48:58] mark at virtualcreations dot com dot au Thanks for the reply, but that made no difference whatsoever. (installed the Win32 version, and restarted Apache. It definitely installed correctly because phpinfo() showed version 4.3.2-dev) [2003-02-20 00:26:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------ [2003-02-20 00:07:49] mark at virtualcreations dot com dot au This just started happening with 4.3.0. Before that it was all fine. The problem only exists on Win32 - it works perfectly on Linux. Using the example from the manual, this works fine: mail("[EMAIL PROTECTED]", "My Subject", "Line 1"); But this returns FALSE and the message is not sent: mail("[EMAIL PROTECTED], [EMAIL PROTECTED]", "My Subject", "Line 1"); However, THIS is fine (note the missing space): mail("[EMAIL PROTECTED],[EMAIL PROTECTED]", "My Subject", "Line 1"); Also, I have yet to figure out a way to send a message where the recipient's NAME is also specified. For example, this fails: mail("Fred <[EMAIL PROTECTED]>", "My Subject", "Line 1"); Finally, when I use a BCC option, it is also dependent upon the placement of a space. For example, if I include a line that reads: $headers .= "Bcc:[EMAIL PROTECTED]\n"; it works as expected, but: $headers .= "Bcc: [EMAIL PROTECTED]\n"; fails. It doesn't make any difference if a "\r\n" is added to the end of the line. I repeat, all the problems above are NOT problems in Linux. Mark. -- Edit this bug report at http://bugs.php.net/?id=22317&edit=1
#22317 [Fbk->Opn]: mail() has address parsing problems
ID: 22317 User updated by: mark at virtualcreations dot com dot au Reported By: mark at virtualcreations dot com dot au -Status: Feedback +Status: Open Bug Type: Mail related Operating System: Win32 PHP Version: 4.3.0 New Comment: Thanks for the reply, but that made no difference whatsoever. (installed the Win32 version, and restarted Apache. It definitely installed correctly because phpinfo() showed version 4.3.2-dev) Previous Comments: [2003-02-20 00:26:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-02-20 00:07:49] mark at virtualcreations dot com dot au This just started happening with 4.3.0. Before that it was all fine. The problem only exists on Win32 - it works perfectly on Linux. Using the example from the manual, this works fine: mail("[EMAIL PROTECTED]", "My Subject", "Line 1"); But this returns FALSE and the message is not sent: mail("[EMAIL PROTECTED], [EMAIL PROTECTED]", "My Subject", "Line 1"); However, THIS is fine (note the missing space): mail("[EMAIL PROTECTED],[EMAIL PROTECTED]", "My Subject", "Line 1"); Also, I have yet to figure out a way to send a message where the recipient's NAME is also specified. For example, this fails: mail("Fred <[EMAIL PROTECTED]>", "My Subject", "Line 1"); Finally, when I use a BCC option, it is also dependent upon the placement of a space. For example, if I include a line that reads: $headers .= "Bcc:[EMAIL PROTECTED]\n"; it works as expected, but: $headers .= "Bcc: [EMAIL PROTECTED]\n"; fails. It doesn't make any difference if a "\r\n" is added to the end of the line. I repeat, all the problems above are NOT problems in Linux. Mark. -- Edit this bug report at http://bugs.php.net/?id=22317&edit=1
#22317 [NEW]: mail() has address parsing problems
From: mark at virtualcreations dot com dot au Operating system: Win32 PHP version: 4.3.0 PHP Bug Type: Mail related Bug description: mail() has address parsing problems This just started happening with 4.3.0. Before that it was all fine. The problem only exists on Win32 - it works perfectly on Linux. Using the example from the manual, this works fine: mail("[EMAIL PROTECTED]", "My Subject", "Line 1"); But this returns FALSE and the message is not sent: mail("[EMAIL PROTECTED], [EMAIL PROTECTED]", "My Subject", "Line 1"); However, THIS is fine (note the missing space): mail("[EMAIL PROTECTED],[EMAIL PROTECTED]", "My Subject", "Line 1"); Also, I have yet to figure out a way to send a message where the recipient's NAME is also specified. For example, this fails: mail("Fred <[EMAIL PROTECTED]>", "My Subject", "Line 1"); Finally, when I use a BCC option, it is also dependent upon the placement of a space. For example, if I include a line that reads: $headers .= "Bcc:[EMAIL PROTECTED]\n"; it works as expected, but: $headers .= "Bcc: [EMAIL PROTECTED]\n"; fails. It doesn't make any difference if a "\r\n" is added to the end of the line. I repeat, all the problems above are NOT problems in Linux. Mark. -- Edit bug report at http://bugs.php.net/?id=22317&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22317&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22317&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22317&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22317&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22317&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=22317&r=support Expected behavior: http://bugs.php.net/fix.php?id=22317&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=22317&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=22317&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22317&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22317&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22317&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22317&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=22317&r=gnused