Self-managed email notifications
Set up SMTP
To set up email notifications for an on-prem build, you must pass environment variables or extend application properties with the following:
SMTP server settings
spring.mail.host (SPRING_MAIL_HOST) - SMTP server host (for example, "smtp.google.com", "email-smtp.us-west-2.amazonaws.com", or "smtp.postmarkapp.com")
spring.mail.port (SPRING_MAIL_PORT) - SMTP server port (for example, 25, 465, or 587)
Authorization
spring.mail.username (SPRING_MAIL_USERNAME) - SMTP server username
spring.mail.password (SPRING_MAIL_PASSWORD) - SMTP server password
spring.mail.properties.mail.smtp.auth (SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH) - true
SSL
spring.mail.properties.mail.smtp.starttls.enable (SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE) - true
For example, using google SMTP server with SSL should look like this:
With environment variables:
To set up email notifications, it is required to set up a "from" address and, optionally, a "reply-to" address. To do that:
notifications.email.from (NOTIFICATIONS_EMAIL_FROM) - valid email address to be used as a sender address
notifications.email.replyTo (NOTIFICATIONS_EMAIL_REPLY_TO) - valid email address to be used as a reply-to address
For example this is what Cortex uses for its notifications:
With environment variables:
Last updated