Mail Server
ON PREMISE This article applies only to Valsight On-Premise. Contact support for Cloud installations.
The application can send emails to users, e.g. notifications on comments or status changes. In order to configure the mail server, add the following to the config.yml file.
Configuration key (grails → mail) | Description | Example value | Default value |
---|---|---|---|
disabled | Whether the applications e-mail system is enabled or disabled. | false | true |
externalUrl | The URL of the application as seen by end users. E-mails may contain links to certain pages in the application and this setting is needed to properly resolve them if the application is behind a reverse proxy. | https://www.mydomain.com/my-valsight-app | n/a |
host | The URL of the e-mail server | smtp.mymailserver.com | n/a |
port | Port of the e-mail server | 465 | n/a |
username | Username of a user that is allowed to send e-mails via the e-mail server | myusername | n/a |
password | Password of a user that is allowed to send e-mails via the e-mail server | mypassword | n/a |
default → from | The value "from" address that will be used by all e-mails sent from the application | autogen@mydomain.com | do-not-respond@valsight.local |
props | Used for configuring additional properties if the mail server requires SSL or TLS connection. More details below. |
YML
| n/a |
Example server configuration with SSL:
grails:
mail:
disabled: false
externalUrl: https://www.mydomain.com/my-valsight-app
host: smtp.gmail.com
username: user@gmail.com
password: password
default:
from: "do-not-respond@valsight.local"
port: 465
props:
mail.smtp.auth: true
mail.smtp.socketFactory.port: 465
mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback: false
Note that the value 'port' and 'mail.smtp.socketFactory.port' must match.
Example server configuration with TLS:
grails:
mail:
disabled: false
externalUrl: https://www.mydomain.com/my-valsight-app
host: smtp.gmail.com
username: user@gmail.com
password: password
default:
from: "do-not-respond@valsight.local"
port: 587
props:
mail.smtp.starttls.enable: true
mail.smtp.port: 587
Note that the value 'port' and 'mail.smtp.port' must match.