Created
July 10, 2019 08:58
-
-
Save sluc23/559061a18e6bd87d64ad50b102af40ca to your computer and use it in GitHub Desktop.
Add SendGrid X-SMTPAPI Headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- CRM/Mailing/BAO/Mailing.php 2019-05-15 20:00:28.000000000 +0200 | |
+++ CRM/Mailing/BAO/Mailing.php.new 2019-07-10 10:56:06.561926552 +0200 | |
@@ -1034,6 +1034,14 @@ | |
if ($isForward) { | |
$headers['Subject'] = "[Fwd:{$this->subject}]"; | |
} | |
+ | |
+ // Add SendGrid X-SMTPAPI Headers | |
+ $json_string = ['category' => $this->name]; | |
+ if ($event_queue_id) { | |
+ $json_string['unique_args'] = ['event_queue_id' => $event_queue_id]; | |
+ } | |
+ $headers['x-smtpapi'] = json_encode($json_string); | |
+ | |
return [&$verp, &$urls, &$headers]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment