Courier

The Courier Developer Hub

Welcome to the Courier developer hub. You'll find comprehensive guides and documentation to help you start working with Courier as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    API Reference

Profile Requirements

To deliver a message to a recipient over SMTP, Courier must be provided the recipient's email address. This value should be included in the recipient profile as email.

// Recipient Profile
{
  "email": "[email protected]"
}

Override

Message Override

You can use a provider override to replace what we send to SMTP using NodeMailer. For example, you can add an attachment to your request:

{
  "event": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
  "recipient": "abc123",
  "profile": {
    "email": "[email protected]",
  },
  "override": {
    "smtp": {
      "body": {
        "attachments": [
          {
            "filename": "text1.txt",
            "content": "aGVsbG8gd29ybGQh",
            "encoding": "base64"
          }
        ]
      }
    }
  }
}

Everything inside of override.smtp.body will replace what we send using NodeMailer. You can see all the available options by visiting the NodeMailer docs.

Transport Override

You may also override the SMTP transport configuration using values passed to override.smtp.config, like so:

{
  "event": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
  "recipient": "abc123",
  "profile": {
    "email": "[email protected]"
  },
  "override": {
    "smtp": {
      "config": {
        auth: {
          user: "username",
          pass: "hunter2"
        },
        host: "smtp.example.com",
        secure: true,
        port: 465
      }
    }
  }
}

Updated 6 months ago


SMTP


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.