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: Feedback
Type: Bug
Package: Mail related
Operating System: Windows 7
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
Thanks for the detailed next steps :)
I'll try and get some testing done using those methods over the weekend.
Previous Comments:
------------------------------------------------------------------------
[2017-04-28 17:13:19] requinix@php.net
I can reproduce the *results* easily enough, using something like
BBcc: user@example.com
which I've made bug #74510 for, but I can't reproduce yet with code that isn't
clearly wrong.
@jonathan, can you come up with a small-ish unredacted script (with or without using
JMail+PHPMailer) that mirrors your code and gives the BReply-To outcome? You can use something like
smtp4dev or Papercut to set up a local test SMTP server that logs messages instead of sending them,
which would allow you to use fake data for everything. Additionally, testing your current code with
smtp4dev/Papercut could at least help establish whether the problem is with PHP.
Meanwhile I'm still looking...
------------------------------------------------------------------------
[2017-04-28 12:51:23] jonathan dot tyler at loadaccess dot net
Zimbra 8.7.1
------------------------------------------------------------------------
[2017-04-28 12:42:57] requinix@php.net
Same question for you: what MTA are you using?
------------------------------------------------------------------------
[2017-04-28 12:35:07] jonathan dot tyler at loadaccess dot net
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();
---
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=71726
--
Edit this bug report at https://bugs.php.net/bug.php?id=71726&edit=1