Setup SMTP provider

Aidbox allows you to configure SMTP email provider to manage your email communications.

To enable SMTP please specify optional environment variable AIDBOX_BASE_URL.

Configuring Mailgun

Mailgun integration tutorial

Configuring Postmark

Postmark integration tutorial

Configuring other SMTP providers

Firstly, get your credentials from your provider:

  • host

  • port

  • from

  • username

  • password

Then, add your provider using AidboxConfigresource:

PUT /AidboxConfig/config
content-type: application/json
accept: application/json

{
    "provider": {
        "yourProviderId": {
            "type": "smtp",
            "host": "smtp.example.com",
            "port": 465,
            // "ssl": true,
            "tls": true,
            "from": "user@example.com",
            "username": "user@example.com",
            "password": "password"
        }
    }
}

Note that you should reference to <yourProviderId> in the Notification resource:

PUT /Notification/notification-1

provider: 'yourProviderId'
providerData:
  to: recipient@example.com
  subject: My subject of the message
  template:
    id: notificationTemplateId
    resourceType: NotificationTemplate
  payload:
    foo:
      bar: zaz

Last updated

Was this helpful?