Mail Configuration

Last Updated: Feb 14, 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'

On this page