Skip to content

Instantly share code, notes, and snippets.

@sluc23
Created Jul 10, 2019
Embed
What would you like to do?
Add SendGrid X-SMTPAPI Headers
--- 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