Skip to:
Content

BuddyPress.org

Changeset 11536


Ignore:
Timestamp:
04/27/2017 02:58:25 AM (8 years ago)
Author:
r-a-y
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.