MailJet
You can send email notifications through MailJet transactional email API.
Unique Identifier
Each provider is identified by a unique identifier. Unique identifier of MailJet provider is mailjet_email
Enabling MailJet
To enable MailJet provider, login to your Engagespot Console, goto Channels -> Email and enable MailJet.
MailJet provider uses email
attribute in your user's profile as the primary address to deliver the notifications. So make sure your user's profile has the email
attribute set.
MailJet Configurations.
MailJet requires the following configurations.
Configuration | Description | Required | Example |
---|---|---|---|
API_KEY | API KEY from your MailJet dashboard | Yes | |
API_SECRET | SECRET KEY from your MailJet dashboard | Yes | |
FROM_EMAIL | Sender signature created in your MailJet dashboard | Yes | |
FROM_NAME | Sender signature created in your MailJet dashboard | Yes |
Overriding Configurations
MailJet provider allows you to override all the above configurations (and you can specify several more options) while sending a notification through Engagespot API, using the https://api.engagespot.co/v3/notifications
endpoint.
To override the configurations, you must supply them via override
-> mailjet_email
parameter of the above API.
Configurations override values should be passed via _config
object, and you can directly supply any additional parameters that will be passed to MailJet API.
For example,
{
"notification": {
"title": "Anand commented on your photo",
"message": "Hey Steve, you're looking cool 😎. Who took this photo?",
"url": "https://your-app.com/photos/17293739",
"category": "comment"
},
"recipients": ["steve@example.com"],
"override": {
"mailjet_email": {
"_config": {
"API_KEY": "ANNHYAAJMLCPWRWGCNBSKHFY",
"API_SECRET": "ANNHYAAJMLCPWRWGCNBSKHFY"
},
"From": {
"Email": "pilot@mailjet.com",
"Name": "Your Mailjet Pilot"
},
"Sender": {
"Email": "copilot@mailjet.com",
"Name": "Your Mailjet Co-pilot"
},
"To": [
{
"Email": "passenger@mailjet.com",
"Name": "Passenger 1"
}
],
"Cc": [
{
"Email": "passenger2@mailjet.com",
"Name": "Passenger 2"
}
],
"Bcc": [
{
"Email": "passenger3@mailjet.com",
"Name": "Passenger 3"
}
],
"ReplyTo": {
"Email": "copilot@mailjet.com",
"Name": "Your Mailjet Co-pilot"
},
"Subject": "Your email flight plan!",
"TextPart": "Dear passenger, welcome to Mailjet! May the delivery force be with you!",
"HTMLPart": "<h3>Dear passenger 1, welcome to <a href=\"https://www.mailjet.com/\">Mailjet!</a></h3><br />May the delivery force be with you!",
"TemplateID": "12345",
"TemplateLanguage": false,
"TemplateErrorReporting": {
"Email": "errors@mailjet.com",
"Name": "Error Email"
},
"TemplateErrorDeliver": true,
"Attachments": [
{
"Filename": "test.txt",
"ContentType": "text/plain",
"Base64Content": "VGhpcyBpcyB5b3VyIGF0dGFjaGVkIGZpbGUhISEK"
}
],
"InlinedAttachments": [
{
"Filename": "logo.gif",
"ContentType": "image/gif",
"Base64Content": "R0lGODlhEAAQAOYAAP////748v39/Pvq1vr6+lJSVeqlK/zqyv7+/unKjJ+emv78+fb29pucnfrlwvTCi9ra2vTCa6urrWdoaurr6/Pz8uHh4vn49PO7QqGfmumaN+2uS1ZWWfr27uyuLnBxd/z8+0pLTvHAWvjar/zr2Z6cl+jal+2kKmhqcEJETvHQbPb07lBRVPv6+cjJycXFxn1+f//+/f337nF0efO/Mf306NfW0fjHSJOTk/TKlfTp0Prlx/XNj83HuPfEL+/v8PbJgueXJOzp4MG8qUNES9fQqN3d3vTJa/vq1f317P769f/8+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA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QzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAAALAAAAAAQABAAAAdUgACCg4SFhoeIiYRGLhaKhA0TMDgSLxAUiEIZHAUsIUQpKAo9Og6FNh8zJUNFJioYQIgJRzc+NBEkiAcnBh4iO4o8QRsjj0gaOY+CDwPKzs/Q0YSBADs=",
"ContentID": "logo"
}
],
"Priority": 2,
"CustomCampaign": "SendAPI_campaign",
"DeduplicateCampaign": true,
"TrackOpens": "account_default",
"TrackClicks": "account_default",
"CustomID": "CustomValue",
"EventPayload": "Eticket,1234,row,15,seat,B",
"MonitoringCategory": "Category1",
"URLTags": "utm_source=newsletter&utm_medium=email&utm_campaign=sale1",
"Headers": "object",
"Variables": "object"
}
}
}
Setup delivery tracking
To set up delivery tracking for the MailJet provider is really simple,
First off, you’ll need the URL from the system from which you want to receive the events. for that got to Engagespot Console -> Channels -> Email -> Configured Providers -> MailJet Instance -> Edit You can see the callback URL like this. Just copy this callback URL.
After Copying callback URL , login in at app.mailjet.com/signin, click “Account settings”
Then Under REST API, click “Event notifications (webhooks)”
You’ll be able to add one webhook for all events or set up specific ones for each type of event.
After making changes, click "Save" button.