SMTP configuration
SMTP configuration is used for sending invitations and password resets to users.
Since version 5.4.0, these settings are required when deploying a new Allure TestOps instance. Without correctly configured SMTP server you won't be able to create the first administrator of the deployed instance and invite new users.
Parameters
Edit the parameters in the values.yaml file:
mail server parameters:
smtp.enabled
— must betrue
;smtp.host
— mail server hostname;smtp.port
— mail server port;smtp.startTLSEnabled
— try to use an encrypted connection with the server;smtp.startTLSRequired
— do not connect if the server does not support encryption;smtp.sslEnabled
— enable SSL support;smtp.sslTrust
— domains for which self-signed certificates can be accepted.
mail account parameters:
smtp.authEnabled
—true
if the mail server requires authentication;smtp.username
— username for connecting to the mail server;smtp.password
— password for connecting to the mail server;smtp.from
— the address that should be shown in the From header of each email.
Note that some SMTP servers may require smtp.from
to be identical to smtp.username
.
Edit the following parameters in the .env file:
mail server parameters:
SMTP_HOST
— mail server hostname;SMTP_PORT
— mail server port;SMTP_STARTTLS_ENABLE
— try to use an encrypted connection with the server;SMTP_STARTTLS_REQUIRED
— never connect if the server does not support encryption;SMTP_SSL_ENABLE
— enable SSL support;SMTP_SSL_TRUST
— domains for which self-signed certificates can be accepted.
mail account parameters:
SMTP_AUTH
—true
if the mail server requires authentication;SMTP_USERNAME
— username for connecting to the mail server;SMTP_PASSWORD
— password for connecting to the mail server;SMTP_MAIL_FROM
— the address that should be shown in the From header of each email.
Note that some SMTP servers may require SMTP_FROM
to be identical to SMTP_USERNAME
.
Edit the following parameters in the /opt/testops/conf/testops.conf file:
mail server parameters:
SPRING_MAIL_HOST
— mail server hostname;SPRING_MAIL_PORT
— mail server port;SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE
— try to use an encrypted connection with the server;SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED
— never connect if the server does not support encryption;SPRING_MAIL_PROPERTIES_MAIL_SMTP_SSL_ENABLE
— enable SSL support;SPRING_MAIL_PROPERTIES_MAIL_SMTP_SSL_TRUST
— domains for which self-signed certificates can be accepted.
mail account parameters:
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH
—true
if the mail server requires authentication;SPRING_MAIL_USERNAME
— username for connecting to the mail server;SPRING_MAIL_PASSWORD
— password for connecting to the mail server;ALLURE_MAIL_FROM
— the address that should be shown in the From header of each email.
Note that some SMTP servers may require ALLURE_MAIL_FROM
to be identical to SPRING_MAIL_USERNAME
.
Examples
Below are examples of configuration parameters for a Gmail account. Note that Google requires to generate dedicated app passwords for SMTP. Other mail services may have similar requirements.
smtp:
enabled: true
host: smtp.gmail.com
port: 587
authEnabled: true
from: [email protected]
username: [email protected]
password: Ohku6Zo9gee5aen0
startTLSEnabled: true
startTLSRequired: true
sslEnabled: true
sslTrust: smtp.gmail.com
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=Ohku6Zo9gee5aen0
[email protected]
SMTP_AUTH=true
SMTP_STARTTLS_ENABLE=true
SMTP_STARTTLS_REQUIRED=true
SMTP_SSL_ENABLE=true
SMTP_SSL_TRUST=smtp.gmail.com
SPRING_MAIL_HOST=smtp.gmail.com
SPRING_MAIL_PORT=587
[email protected]
SPRING_MAIL_PASSWORD=Ohku6Zo9gee5aen0
[email protected]
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_SSL_ENABLE=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_SSL_TRUST=smtp.gmail.com