View Issue Details

IDProjectCategoryView StatusLast Update
0016892phplist applicationEmailpublic01-10-13 14:57
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.4 
Target Version3.0.XFixed in Version3.0.5 
Summary0016892: Two To headers created when using php mail() function
DescriptionWhen sending using the php mail() function two To: headers are being created.

These are the headers of a received email with a few removed:

To: xxx@yahoo.co.uk
Subject: Test of content areas
Received: from 149.241.244.77 [149.241.244.77] by www.dcameron.me.uk with HTTP; Sun, 29 Sep 2013 22:37:07 +0000
Date: Sun, 29 Sep 2013 22:37:08 +0000
From: Duncan Cameron <xxx@dcameron.me.uk>
Reply-To: Duncan Cameron <xxx@dcameron.me.uk>
Message-ID: <87020b5f6c2d294c8979fcdbfc9755e3@www.dcameron.me.uk>
X-Priority: 3
X-Mailer: PHPMailer 5.2.5 (https://github.com/Synchro/PHPMailer/)
X-phpList-version: 3.0.4
X-MessageID: 4
X-ListMember: xxx@yahoo.co.uk
Precedence: bulk
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_87020b5f6c2d294c8979fcdbfc9755e3"
To: xxx@yahoo.co.uk

Sending through an SMTP server doesn't seem to have the same problem.

Possible cause is the method MailSend() in class PHPlistMailer. It adds a To header after phpmailer has already created the headers. This looks to be unnecessary because the method compatSend() already has added the To address including the developer_email processing.

That method has changed between 3.0.2 and 3.0.4.
TagsNo tags attached.

Activities

duncanc

30-09-13 09:07

developer   ~0052293

This problem can cause the emails to be rejected.

In my case the email was delivered but the person who reported this in the forum said that his emails were rejected - http://forums.phplist.com/viewtopic.php?f=35&t=39695

Someone else has reported receiving emails twice - http://forums.phplist.com/viewtopic.php?f=35&t=39691

michiel

30-09-13 11:26

manager   ~0052294

I'll look into it properly, but in the meantime the workaround is to comment out line 590 in class.phplistmailer.php

# $header .= "To: ".$this->destinationemail.$this->LE;