From:             danny at mintyslippers 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 <[EMAIL PROTECTED]>" 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
<[EMAIL PROTECTED]>>". 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 "[EMAIL PROTECTED]" without any
<> brackets it works fine but cannot use the name.


Reproduce code:
---------------
<?php

$mailto = "[EMAIL PROTECTED]" ;
$subject = "Mintyslippers Feedback" ;

$messageproper = "Test";

mail($mailto, $subject, $messageproper, "From: Test User
<[EMAIL PROTECTED]" );
?>

Expected result:
----------------
Sucessful email


Actual result:
--------------
Invalid e-mail address

-- 
Edit bug report at http://bugs.php.net/?id=45932&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45932&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45932&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45932&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45932&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45932&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45932&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45932&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45932&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45932&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45932&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45932&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45932&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45932&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45932&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45932&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45932&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45932&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45932&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45932&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45932&r=mysqlcfg

Reply via email to