MailerSend
You can send email notifications through MailerSend transactional email API.
Unique Identifier
Each provider is identified by a unique identifier. Unique identifier of Postmark provider is mailersend_email
Enabling MailerSend
To enable MailerSend provider, login to your Engagespot dashboard, goto Channels -> Email and enable MailerSend.
MailerSend 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.
MailerSend Configurations.
MailerSend requires the following configurations.
Configuration | Description | Required | Example |
---|---|---|---|
API_KEY | API token from your MailerSend dashboard | Yes | |
FROM_EMAIL | Sender signature created in your MailerSend dashboard | Yes | |
FROM_NAME | Sender signature created in your MailerSend dashboard | Yes |
Overriding Configurations
MailerSend 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
-> mailersend_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 MailerSend 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": {
"mailersend_email": {
"_config": {
"API_KEY": "ANNHYAAJMLCPWRWGCNBSKHFY",
},
"from": {
"email": "hello@mailersend.com",
"name": "MailerSend"
},
"to": [
{
"email": "john@mailersend.com",
"name": "John Mailer"
}
],
"subject": "Hello from {$company}!",
"text": "This is just a friendly hello from your friends at {$company}.",
"html": "<b>This is just a friendly hello from your friends at {$company}.</b>",
"variables": [
{
"email": "john@mailersend.com",
"substitutions": [
{
"var": "company",
"value": "MailerSend"
}
]
}
]
}
},
}