#32600 [Opn->Bgs]: PHP sets return-path incorrectly

From: Date: Sun, 07 Aug 2005 22:14:21 +0000
Subject: #32600 [Opn->Bgs]: PHP sets return-path incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83150@lists.php.net to get a copy of this message
 ID:               32600
 Updated by:       sniper@php.net
 Reported By:      freddie at vbulletin dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Mail related
 Operating System: Win32
 PHP Version:      5.0.4
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Same as bug #28038 (It's a general problem with address formatting)



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

[2005-04-06 01:07:49] freddie at vbulletin dot com

Correction:

RPath should be set to "email@example.com", not "<email@example.com>"

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

[2005-04-06 01:03:55] freddie at vbulletin dot com

Description:
------------
A new bug has been introduced with the bug fix listed at
http://bugs.php.net/bug.php?id=28976

The above fix attempts to set a reverse-path based on the From: header
if sendmail_from is undefined.

The problem with this is that the From: header is taken verbatim and
not formatted to the RFC 2822 specification.

This results in the email being rejected by the server.

Reproduce code:
---------------
Example:

$headers .= "From: \"Example User\" <email@example.com>";

PHP will then set  the RPath to "\"Example User\" <email@example.com>"
when it should be "<email@example.com>"

Expected result:
----------------
Line 440 win32/sendmail.c:

snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<email@example.com>\r\n",
RPath);

Actual result:
--------------
Line 440 win32/sendmail.c:


snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<Example User
<email@example.com>>\r\n", RPath);


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


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


Thread (3 messages)

« previous php.bugs (#83150) next »