Setup SMTP provider
Aidbox allows you to configure SMTP email provider to manage your email communications.
To enable SMTP please specify optional environment variable Optional environment variables.
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 AidboxConfig
resource:
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 \
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