Skip to main content

Prerequisites

Setup

1

Verify your domain

In MailerSend, open Domains, add your domain, and complete DNS verification.
2

Generate an API token

Click “Manage” on your domain and generate an API token.
3

Configure in Courier

In Courier, open the page. Enter your API token and From Address, then click “Save.”
Addressing a recipient and sending are the same on every email provider, so they are documented once: and .

Overrides

covers the two levels and which one wins. lists the fields every email provider takes. You can override any field MailerSend’s /v1/email endpoint supports. Use an override when Courier does not support a field yet, or to replace a value Courier generates. This example swaps the API key and the sender in config:

Attachments

Add an attachments array in the override. File content must be base64-encoded.

Troubleshooting

A 422 error from MailerSend has several possible causes:The most common cause is an unverified sending domain. Verify your domain with MailerSend before using it with Courier.

Provider details

Courier recommends routing to the channel. Naming this key in routing.channels instead is supported, and sends through just this provider.

Send to a specific provider

When that is worth doing, and what you give up: failover, channel priority, and providers you add later.