Mail server connection is originally configured in the file win32.config
(or unixlinux.config
in Linux installations) with the property mail.configuration. If these settings need to be changed after installation, it is best to do the changes both to the win32.config
and the context.xml
file that is found in the application/config/tomcat
directory. If setup script is run again after installation, the values from win32.config
will override the mail settings in context.xml
and running update scripts will copy the context.xml
file from the config directory to the actual installation where the application server is running/linux.config
configuration file and directly to WildFly configuration.
The following table explains the different mail server settings:
Property Name | Description | ||
---|---|---|---|
mail. | fromhost | The | return emailaddress of the | current user.
| The default user name to use when connecting to the mail server. | ||
| Password for the SMTP server, if required. | ||
| The address of the SMTP server to be used. | ||
SMTP server to be used. It can either be the host name or the IP address of the mail server. | |||
mail.port | The port of the SMTP server to be used | . Defaults to 25. | |
mail. | smtp.authIf true, attempts to authenticate the user using the AUTH command. Defaults to false. | ||
| If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Defaults to false. |
Here is an example of how the mail configuration in win32.config
could look like:
Code Block | ||
---|---|---|
| ||
mail.configuration=mail.smtp.host\="localhost" mail.from\="eidm2@@localhost" mail.user\="" |
Notice that in win32.config
file @ character needs to be escaped with another @ character and = character with a \. These escapes are not needed when editing the context.xml
file.
When encrypted communication is needed, use the mail.smtp.starttls.enable
with value true. Here is an example of win32.config
when connecting with encryption:
Code Block | ||
---|---|---|
| ||
mail.configuration=mail.smtp.host\="localhost" mail.smtp.port\="465" mail.from\="eidm2@@localhost" mail.user\="user" mail.password\="XXXXXXXX" mail.smtp.auth\="true" mail.smtp.starttls.enable\="true" |
username | The user name to use when connecting to the mail server. Can be left empty if no user needs to be defined when contacting the mail server. |
mail.password | Password for the SMTP server, if required. |
mail.from | The email address from which emails from Ubisecure CustomerID seem to be coming from. You need to double the @ character. For example: noReplies@@example.com |
mail.ssl | If true, SSL is used. |
The issuer of the mail server SSL certificate must be trusted by the java Java environment by adding it to the java Java truststore.
Adding Mail Server Certificate to Java Truststore
The usage of SSL is required recommended when making the SMTP connection from Ubisecure CustomerID to a secure mail server. You must add the certificate of the issuer to the Ubisecure CustomerID trust store.
In Windows the Java certificate storage is by default in the following file:
...