#45249 [NEW]: Invalid e-mail address when using name
From: dannyoneill at ntlworld dot com
Operating system: Windows Server 2003 SP2
PHP version: 5.2.6
PHP Bug Type: Mail related
Bug description: Invalid e-mail address when using name
Description:
------------
Since upgrading to PHP 5.2.6 I can no longer use a full email address.
When sending an email to "Joe Blogs <joe@example.com>" It fails with
"Invalid e-mail address". This is on a basic mail script.
It appears to be because PHP 5.2.6 reparses this as "<Joe Blogs
<joe@example.com>>". It tries to help and add more <> brackets than
necessary.
The only thing changed on my server is PHP. Others have reported the
problem on phpfreaks.com. I also tested on a freshly built virtual server
with the same results.
I also run wordpress which also fails when sending mails because of this.
If I write a script to just mailto "joe@example.com" without any <>
brackets it works fine but cannot use the name.
Reproduce code:
---------------
<?php
$mailto = "myemail@mydomain.com" ;
$subject = "Mintyslippers Feedback" ;
$messageproper = "Test";
mail($mailto, $subject, $messageproper, "From: Test User
<test@theirdomain.com" );
?>
Expected result:
----------------
Sucessful email
Actual result:
--------------
Invalid e-mail address
--
Edit bug report at http://bugs.php.net/?id=45249&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45249&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45249&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45249&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45249&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45249&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45249&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45249&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45249&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45249&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45249&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45249&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45249&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45249&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45249&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45249&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45249&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45249&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45249&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45249&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45249&r=mysqlcfg
Thread (4 messages)
- dannyoneill at ntlworld dot com