ID:               28038
 Updated by:       garre...@php.net
 Reported By:      jordi at jcanals dot net
-Status:           Assigned
+Status:           Closed
 Bug Type:         Mail related
 Operating System: win32 only
 PHP Version:      5.*, 6SVN
-Assigned To:      pajoye
+Assigned To:      garretts
 New Comment:

I've fixed this in PHP-5.3.1-dev.

I added in code to use the contents between angle brackets < > if there
is a pair of angle brackets passed in.

If the angle brackets are not passed in as a pair, this patch doesn't
alter the contents (missing one angle bracket is clearly invalid), and
should likely be rejected by the SMTP server.

And, for the record SMTP (RFC 2821) doesn't have its addresses defined
by RFC 2822 for "MAIL FROM:" and "RCPT TO:" -- they should be just the
undecorated mailbox address. (see RFC 2821- 4.1.2 Command Argument
Syntax)









Previous Comments:
------------------------------------------------------------------------

[2009-04-06 14:29:44] php at shitware dot nl

I'm no C expert, but wouldn't this provide a quick fix:

instead of:

snprintf(Buffer, MAIL_BUFFER_SIZE, "RCPT TO:<%s>\r\n", token);

use:

snprintf(Buffer, MAIL_BUFFER_SIZE, token[(strlen(token)-1)] == ">" ?
"RCPT TO:%s\r\n" : "RCPT TO:<%s>\r\n", token);

for EVERY use of token (including RPath)?

(plain e-mail addresses are still placed between <...>, formatted
e-mail addresses get in the transaction unaltered)

I tried setting up the Windows build environment to test this, but got
lost in the different how-to's ...

------------------------------------------------------------------------

[2009-02-24 23:25:22] mark at lbisat dot com

By modifying the following in PHP.ini

[mail function]
sendmail_from = em...@domain.com

It fixed the issue for me on Windows 2003 Server SP2.

------------------------------------------------------------------------

[2009-01-12 11:49:18] julioworld at hotmail dot com

I also had this problem and I solved it by adding this line in the
php.ini in the section [mail function]:

[mail function]
sendmail_from = em...@domain.com

------------------------------------------------------------------------

[2009-01-06 19:41:42] ghooey at gmail dot com

Unlike with a linux server the email address in
ini_set('sendmail_from', 'm...@domain.com); has to be a valid email
address

------------------------------------------------------------------------

[2008-12-10 19:46:45] jordi at jcanals dot net

You did not understand where the bug is (or was). We pass the proper
headers exactly the same in any platform. PHP mail layer change them to
the wrong format, by adding extra signs.

What you say we have to consider, Is what we are doing. Read carefully
the bug description, the headers sent to PHP mail function, and the
headers sent by the mail layer to the mail server.

------------------------------------------------------------------------

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/28038

-- 
Edit this bug report at http://bugs.php.net/?id=28038&edit=1

Reply via email to