Skip to content

Commit bc7b9bf

Browse files
committed
Add plugin name/version to XMailer header
1 parent 7652e2c commit bc7b9bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
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));

0 commit comments

Comments
 (0)