Skip to content

Commit 5658f03

Browse files
authored
Merge pull request #93 from SparkPost/smtp-mailer
Add plugin name/version to XMailer header
2 parents 7652e2c + f0c0829 commit 5658f03

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mailer.smtp.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public function __construct()
1616
}
1717

1818
public function configure_phpmailer($phpmailer) {
19+
$xmailer = 'wordpress-sparkpost/' . WPSP_PLUGIN_VERSION . ' on PHPMailer ' . $phpmailer->Version . ' (https://github.com/PHPMailer/PHPMailer)';
20+
1921
$settings = SparkPost::get_settings();
2022

2123
if (!$settings['enable_sparkpost'] || empty($settings['password'])) {
@@ -38,6 +40,7 @@ public function configure_phpmailer($phpmailer) {
3840
$phpmailer->SMTPAuth = true;
3941
$phpmailer->Username = 'SMTP_Injection';
4042
$phpmailer->Password = apply_filters('wpsp_api_key', $settings['password']);
43+
$phpmailer->XMailer = $xmailer;
4144

4245
$json_x_msys_api = apply_filters('wpsp_smtp_msys_api', $x_msys_api);
4346
$phpmailer->addCustomHeader('X-MSYS-API', json_encode($json_x_msys_api));

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: sparkpost, rajuru
33
Tags: sparkpost, smtp, wp_mail, mail, email
44
Requires at least: 4.3
5-
Tested up to: 4.7.1
5+
Tested up to: 4.7.2
66
Stable tag: 2.6.2
77
License: GPLv2 or later
88

0 commit comments

Comments
 (0)