I'm using an e-mail provider (sparkpost) for sending mail from my Joomla! website. Some mails are marketing e-mails others are transactional e-mails.
The default e-mail setting in sparkpost is 'marketing'. There is an option to overrule this: add a SMTP header to the e-mail which states the e-mail is transactional.
I'm sending mail with the JMail class. I'd like to add this extra sparkpost header named X-MSYS-API to e-mails, which can contain params as JSON data.
The option to add to the header is option.transactional:false
X-MSYS-API: {
"campaign_id": "my_campaign",
"metadata" : {
"has_pets": true,
"pet_name": "Spot"
},
"cc": [
{ "email": "[email protected]", "name": "CC 1" },
{ "email": "[email protected]", "name": "CC 2" }
],
"bcc": [
{ "email": "[email protected]", "name": "BCC 1" }
{ "email": "[email protected]", "name": "BCC 2" }
],
"archive": [
{ "email": "[email protected]", "name": "Archive 1" }
{ "email": "[email protected]", "name": "Archive 2" }
],
"tags": [
"cat",
"dog"
],
"options" : {
"open_tracking": false,
"click_tracking": false,
"transactional": false,
"sandbox": false,
"skip_suppression": false,
"ip_pool": "sp_shared",
"inline_css": false
}
}
Does JMail support adding a SMTP header?