Affects Version/s: 7.2.0 GA1
Fix Version/s: None
Liferay allows to configure the mail server connection in the serveradministration. But when doing so, it is not possible to enable a secure connection since the port is not honored.
Steps to reproduce:
1) Go to Server Administration, Mail
2) Set an outgoing port of e.g. 1234
3) Enable "Use a Secure Network Connection"
4) Set log level to debug for MailEngine
5) Trigger a mail, e.g. by registering a new user
6) Check logfile:
2019-11-24 13:55:00.700 WARN [liferay/mail-1][MailEngine:634] Unable to connect to a valid mail server. Please make sure one is properly configured: Could not connect to SMTP host: localhost, port: 25
Instead of using the configured port, the smtp default port 25 is used. I suspect, this is due to the fact, that there are two properties for smtp and smtps port configuration. But through the UI, only the smtp port can be set.