php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35013 bad passing of header to get sender's email address
Submitted: 2005-10-29 03:46 UTC Modified: 2006-01-06 03:15 UTC
From: php-louis at steelbytes dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 5CVS-2005-10-31 (snap) OS: win2003
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 + 1 = ?
Subscribe to this entry?

 
 [2005-10-29 03:46 UTC] php-louis at steelbytes dot com
Description:
------------
when mail() is passing the headers to get the sender's email address and the headers are similar to the following:
  To: blah
  From: user@domain.tld
  AnotherHeader: value
it retrieves " user@domain.tld" as the senders email, instead of "user@domain.tld".  this is a problem when sending email to yahoo, as the MAIL FROM smtp command that mail() generates looks like the following:
  MAIL FROM:< user@domain.tld>
instead of 
  MAIL FROM:<user@domain.tld>
or
  MAIL FROM: <user@domain.tld>
and yahoo rejects.


Reproduce code:
---------------
mail('test@yahoo.com','test subject','test body','From: user@myserver.tld');

Expected result:
----------------
yahoo rejects with the following
  501 Syntax error in parameters or arguments


Actual result:
--------------
n/a

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-01 11:35 UTC] sniper@php.net
See bug #28038, this is just one more case related to that.

 [2006-01-06 03:15 UTC] sniper@php.net
This should be fixed in CVS now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 04:01:30 2024 UTC