Mail Configuration

Last Updated: Mar 29, 2022
documentation for the dotCMS Content Management System

dotCMS expects there to be a global mail provider configured as mail/MailSession. You can configure this by setting environment variables.

Environment Variables Example

You can use environment variables to configure SMTP service to be used by dotCMS when sending emails. Below are examples of how to use environment variables to configure SMTP:

SMTPS

Configure dotCMS to use use SMTPS (note the relevant environmental variables have MAIL_SMTPS in them).

DOT_MAIL_TRANSPORT_PROTOCOL: smtps
DOT_MAIL_SMTPS_HOST: email-smtp.us-east-1.amazonaws.com
DOT_MAIL_SMTPS_USER: abc123
DOT_MAIL_SMTPS_PASSWORD: 123abc
DOT_MAIL_SMTPS_AUTH: 'true'
DOT_MAIL_SMTPS_PORT: '465'

SMTP+TLS

Configure dotCMS to use SMTP + starttls:

DOT_MAIL_TRANSPORT_PROTOCOL: smtp
DOT_MAIL_SMTP_HOST: email-smtp.us-east-1.amazonaws.com
DOT_MAIL_SMTP_USER: abc123
DOT_MAIL_SMTP_PASSWORD: 123abc
DOT_MAIL_SMTP_AUTH: 'true'
DOT_MAIL_SMTP_PORT: '587'
DOT_MAIL_SMTP_STARTTLS_ENABLE: 'true'

SMTP Servers With Untrusted SSL Certificates

To connect to SMTP servers with untrusted SSL certificates, use either:

DOT_MAIL_SMTP_SSL_TRUST: 'smtp.example.com'

or

DOT_MAIL_SMTPS_SSL_TRUST: 'smtp.example.com'

On this page

×

We Dig Feedback

Selected excerpt:

×