Skip to content

Commit e75a5a3

Browse files
committed
added check for sandbox in smtp
1 parent 884d64b commit e75a5a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mailer.smtp.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public function configure_phpmailer($phpmailer) {
2929
'options' => array (
3030
'open_tracking' => (bool) apply_filters('wpsp_open_tracking', $tracking_enabled),
3131
'click_tracking' => (bool) apply_filters('wpsp_click_tracking', $tracking_enabled),
32-
'transactional' => (bool) apply_filters('wpsp_transactional', $settings['transactional'])
32+
'transactional' => (bool) apply_filters('wpsp_transactional', $settings['transactional']),
33+
'sandbox' => SparkPost::is_sandbox($phpmailer->From),
3334
)
3435
);
3536

@@ -40,7 +41,7 @@ public function configure_phpmailer($phpmailer) {
4041
$phpmailer->SMTPAuth = true;
4142
$phpmailer->Username = 'SMTP_Injection';
4243
$phpmailer->Password = apply_filters('wpsp_api_key', $settings['password']);
43-
$phpmailer->XMailer = $xmailer;
44+
$phpmailer->XMailer = $xmailer;
4445

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

0 commit comments

Comments
 (0)