[buddypress-trac] [BuddyPress Trac] #7509: BP_PHPMailer needs to set the `Date` header

buddypress-trac noreply at wordpress.org
Thu Apr 27 02:58:26 UTC 2017


#7509: BP_PHPMailer needs to set the `Date` header
--------------------------+---------------------
 Reporter:  r-a-y         |       Owner:  DJPaul
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  2.9
Component:  Emails        |     Version:  2.5.0
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+---------------------
Changes (by r-a-y):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"11536"]:
 {{{
 #!CommitTicketReference repository="" revision="11536"
 Emails: Set the 'Date' header for `BP_PHPMailer`.

 Since the `BP_PHPMailer` class uses a static instance of PHPMailer:
 https://buddypress.trac.wordpress.org/browser/tags/2.8.2/src/bp-
 core/classes/class-bp-phpmailer.php?marks=28,39,47#L27

 PHPMailer would only set the `Date` field for the email on the initial
 send:
 https://github.com/WordPress/WordPress/blob/4.7-branch/wp-includes/class-
 phpmailer.php#L2028

 In cases where a long-running script is utilizing `BP_PHPMailer`,
 subsequent emails would be sent out with the wrong `Date` field, making
 these emails hard to find in an email client.

 This commit rectifies this by always setting the `Date` field for our
 version of PHPMailer.

 Fixes #7509.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7509#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list