Bug #71726 [Com]: Headers are transformed wrongly

From: Date: Fri, 28 Apr 2017 12:35:20 +0000
Subject: Bug #71726 [Com]: Headers are transformed wrongly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208832@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71726&edit=1 ID: 71726 Comment by: jonathan dot tyler at loadaccess dot net Reported by: bugs dot php at myrosoft dot com Summary: Headers are transformed wrongly Status: No Feedback Type: Bug Package: Mail related Operating System: Windows 7 PHP Version: 7.0.4 Block user comment: N Private report: N New Comment: Hello, I am running 7.1 (tested with x86 and x86_64) on IIS 8 - Windows Server 2012 R2. I am seeing the same issue using PHPMailer in Joomla. Though it's not shown below, there is always a BCC added (to webdev team) on mail sent from our site. When I look at the mail headers after receiving it in my mailbox I see the following (personal details changed): --- Subject: MyEmailSubject To: My Name <me@mydomain.com> X-PHP-Originating-Script: 0:class.phpmailer.php Date: Fri, 28 Apr 2017 08:04:30 -0400 From: Website <mailer@mydomain.com> BReply-To: Other Name <other-person@mydomain.com> Message-ID: <fb6c4df7ce01bb2cc4a69e389fd971d2@www.mydomain.com> X-Mailer: PHPMailer 5.2.16 (https://github.com/PHPMailer/PHPMailer) MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 --- If I switch back to 5.6.22: --- Subject: MyEmailSubject To: My Name <me@mydomain.com> X-PHP-Originating-Script: 0:class.phpmailer.php Date: Fri, 28 Apr 2017 08:14:44 -0400 From: Website <mailer@mydomain.com> Reply-To: Other Name <other-person@mydomain.com> Message-ID: <1ff963ff75dd75a170c47189df4c5e4a@www.tasktracker.ca> X-Mailer: PHPMailer 5.2.16 (https://github.com/PHPMailer/PHPMailer) MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 --- Here's a sample email setup: --- $mailer = JFactory::getMailer(); $mailer->LE = "\r\n"; // Line End CRLF $mailer->isHTML(true); $mailer->addRecipient('me@mydomain.com', 'My Name'); $mailer->addReplyTo('other-person@mydomain.com', 'Other Name'); $mailer->addBCC('dev@mydomain.com', 'Dev Team'); $mailer->setFrom('mailer@mydomain.com', 'Website'); $mailer->setSubject('MyEmailSubject'); $mailer->setBody( 'Testing ReplyTo issue.' ); $mailer->send(); --- Previous Comments: ------------------------------------------------------------------------ [2016-03-20 04:22:24] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2016-03-07 10:09:35] requinix@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Also, what MTA are you using? ------------------------------------------------------------------------ [2016-03-07 09:39:52] bugs dot php at myrosoft dot com Description: ------------ Sending mail under Windows can sometimes modify the headers wrongly. Different headers are mixed up. eg.: 'Bcc: report.web@myrosoft.com'.$nl. 'Reply-to: noreply@myrosoft.com'.$nl. maybe transformed to BReply-to: noreply@myrosoft.com I have noticed different behaviour, depending on the script. Test script: --------------- http://myrosoft.com/Files/PhpBug/mail2.php ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71726&edit=1

« previous php.bugs (#208832) next »