MailerSend
Profile Requirements
To deliver a message to a recipient over MailerSend, Courier must be provided the recipient's email address. This value should be included in the recipient profile as email
.
// Recipient Profile
{
"email": "example@example.com"
}
Authentication Token Generation
First you need to add your domain and verify it.
Click on “Manage” button and in the following screen generate an authentication token
Override
Overrides can be used to change the request body that Courier uses to send an email. Overrides are useful when a field is not yet supported by Courier or you would like to override the value that Courier generates. You can override any of the fields supported by MailerSend's https://api.mailersend.com/v1/email
endpoint (see all mail send request body fields here. Below is an example of overriding the subject:
{
"event": "<COURIER_NOTIFICATION_ID>",
"recipient": "abdul_ahmady",
"profile": {
"email": "hello@courier.com"
},
"data": {
"name": "Abdul Ahmady"
},
"override": {
"mailersend": {
"config": {
"apiKey": "<YOUR_OVERRIDDEN_API_KEY>",
"fromAddress": "<YOUR_OVERRIDDEN_From_ADDRESS>",
"url": "<YOUR_OVERRIDDEN_URL>"
}
}
}
}