Skip to main content

Prerequisites

  • An SMTP server you can send through
  • The host, username, and password for that server

Setup

Courier’s SMTP integration uses NodeMailer. Open the in Courier, enter your SMTP host, username, password, and From Address, then save. A provider override can change any of these for a single message.
Courier connects to your SMTP server from AWS-hosted infrastructure and does not use fixed outbound IPs. If your server requires IP allowlisting, see on the Email Providers page.
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. Provider overrides in the Send API change the message content and the SMTP transport configuration, one message at a time.

Message override

An override changes what Courier sends over SMTP through NodeMailer. Overrides are deep-merged into the request: fields you set replace their counterparts, and everything you leave out is still sent. For example, add an attachment:
Courier merges everything inside message.providers.smtp.override.body into its generated message and passes it to NodeMailer. For every option, see the NodeMailer message options documentation.

Transport override

Values in message.providers.smtp.override.config override the SMTP transport configuration. They replace your stored provider configuration for that one message. Basic example:
STARTTLS (port 587, recommended):
Implicit TLS (port 465):
Common provider settings: Transport options reference: All options: See the NodeMailer SMTP transport documentation for every config override option.

Security best practices

  • Use app-specific passwords for Office 365 and Gmail, not regular account passwords.
  • Send from a dedicated service account, not a personal one.
  • Store credentials in Courier Studio instead of passing them in every API request.
  • Always use TLS: set requireTLS: true for port 587, secure: true for port 465.
  • For HIPAA or data residency requirements, use a direct connection to your on-premises SMTP server.

Troubleshooting

Courier verifies your SMTP connection before each send. If verification fails, Courier does not send the message and returns an error. Courier retries connection timeouts (ETIMEDOUT) and temporary server unavailability.
  • Check that firewall rules allow outbound connections to your SMTP server
  • Check the SMTP host and port
  • Check that your SMTP server is reachable from Courier’s infrastructure
  • Check the username and password
  • For Office 365 with MFA enabled, use an app-specific password
  • Check that the account may send email over SMTP
  • Check that your SMTP server supports the encryption method you requested
  • Check certificate validity if you use custom certificates
  • Check that secure and requireTLS match your server configuration

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.