MailjetSwiftMailer icon indicating copy to clipboard operation
MailjetSwiftMailer copied to clipboard

CustomCampaign

Open olivier-sabban opened this issue 7 years ago • 3 comments

Hi,

I would like to use mailjet "CustomCampaign" property to attach my mail to a campain. https://dev.mailjet.com/guides/#grouping-into-a-campaign

I did not find any logic property of Swift_Mime_Message to link correctly CustomCampain into your getMailjetMessage function to push a pull request

Do you have any simple idea or do I need to build my own Swift_Transport ?

olivier-sabban avatar Feb 22 '18 06:02 olivier-sabban

ping @Zhivko-Mailjet

Nightbr avatar Mar 01 '18 08:03 Nightbr

cc @eboisgon

latanasov avatar Mar 02 '18 11:03 latanasov

I have been working on the same problem and sound a solution. In https://app.mailjet.com/docs/emails_headers it is stated that you can send the custom campaign name as a header named 'X-Mailjet-Campaign' this seems to work for me.

$headers = $swiftMsg->getHeaders();
$headers->addTextHeader('X-Mailjet-Campaign', "CustomCampaignName");

Nils-1st-retail avatar May 14 '19 05:05 Nils-1st-retail