Configure the SMTP Server Using REST API
On This Page
Overview
Configuring the SMTP server determines the mail server and account that will be used to generate the global email notifications. Once you add the information, you can test the connection to ensure no additional settings need to be added for the notifications to work.
DryvIQ uses MailKit, which includes a default server certificate validation for a list of commonly used mail servers such as gmail.com, outlook.com, mail.me.com, yahoo.com, and gmx.net.
Notifications cannot be set up on an SMTP server that has an untrusted SSL certificate. The environment where DryvIQ is running needs to trust the certificate. This can be done by manually trusting the certificate or using a valid self-signed certificate.
Field | Description | Required |
---|---|---|
Server name | The fully qualified domain name of the SMTP service | Required |
Server port | The SMTP service port number. (In most cases this will be port 587; however, ports 25 or 465 may be utilized but are not preferred. For more information on SMTP ports, see here: https://www.socketlabs.com/blog/what-port-does-smtp-use/) |
|
From | The default sender; if not specified, user name will be used | Required if a username is not provided |
Username | The STMP server username | Required if your mail server requires authentication |
Password | The SMTP service password Depending on the service this could be your email password | Required if your mail server requires authentication |
Configure the SMTP Server
Execute a PATCH to configure the email handler to receive notifications. This request configuration will persist. To execute a test, which will not persist, see Send a Test Email Notification | REST API.
PATCH {{url}}v1/notifications/handlers/email
Example Request Body
{
"from": "smtp@companydomain.com",
"host": "smtp.companydomain.com",
"password": "secret",
"port": 587,
"username": "smtp@companydomain.com"
}