Concept Updated July 22, 2024

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.ymlfile.

Configuration key (spring → mail)DescriptionExample valueDefault value
valsightProperties → enabledWhether the applications e-mail system is enabled or disabled.truefasle
valsightProperties → defaultFromThe value “from” address that will be used by all e-mails sent from the applicationautogen@mydomain.comdo-not-respond@valsight.local
hostThe URL of the e-mail serversmtp.mymailserver.comn/a
portPort of the e-mail server465n/a
usernameUsername of a user that is allowed to send e-mails via the e-mail servermyusernamen/a
passwordPassword of a user that is allowed to send e-mails via the e-mail servermypasswordn/a
propertiesUsed for configuring additional properties if the mail server requires SSL or TLS connection. More details below.
properties:
   mail.smtp.auth: true
   mail.smtp.socketFactory.port: 465
   mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory
   mail.smtp.socketFactory.fallback: false

| n/a |

Example server configuration with SSL:

spring:
    mail:
        valsightProperties:
            enabled: true
            defaultFrom: "do-not-respond@valsight.local"
        host: smtp.gmail.com
        username: user@gmail.com
        password: password
        port: 465
        properties:
            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:

spring:
    mail:
        valsightProperties:
            enabled: true
            defaultFrom: "do-not-respond@valsight.local"
        host: smtp.gmail.com
        username: user@gmail.com
        password: password
        port: 587
        properties:
            mail.smtp.starttls.enable: true
            mail.smtp.port: 587

Note that the value ‘port’ and ‘mail.smtp.port’ must match.

Was this page helpful?