ID: 32600 User updated by: freddie at vbulletin dot com Reported By: freddie at vbulletin dot com Status: Open Bug Type: *Mail Related Operating System: Win32 PHP Version: 5.0.4 New Comment:
Correction: RPath should be set to "[EMAIL PROTECTED]", not "<[EMAIL PROTECTED]>" Previous Comments: ------------------------------------------------------------------------ [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 PROTECTED]>"; PHP will then set the RPath to "\"Example User\" <[EMAIL PROTECTED]>" when it should be "<[EMAIL PROTECTED]>" Expected result: ---------------- Line 440 win32/sendmail.c: snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<[EMAIL PROTECTED]>\r\n", RPath); Actual result: -------------- Line 440 win32/sendmail.c: snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<Example User <[EMAIL PROTECTED]>>\r\n", RPath); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32600&edit=1