Mail server connection failed with SMTP
After configuring the mail server in Confluence to use SMTP with port 465, sending a test email fails with the following log:
The following appears in the Atlassian-Confluence
2016-02-02 02:57:04,496 ERROR [http-nio-8090-exec-1] [atlassian.confluence.jmx.JmxUtil] unregisterBean Unable to unregister object with name [ Confluence:name=MailServer-SMTP Сервер ] due to : javax.management.InstanceNotFoundException: Confluence:name=MailServer-SMTP Сервер -- referer: http://22.214.171.124/confluence/admin/mail/editmailserver.action?id=1454367622001 | url: /confluence/admin/mail/doeditmailserver.action | userName: cnf | action: doeditmailserver
Port 465 shows up in Appendix A of the 1996 non-standard The SSL Protocol Version 3.0 as "Simple Mail Transfer Protocol with SSL". Unfortunately, it's not registered for SMTPs. It's registered for URD - "URL Rendezvous Directory for SSL" by Cisco. The recommended approach, at least for authentication, is to use STARTTLS encryption on port 587.
Port 25 can be used but it is for server to relay messages to one another. Port 587 is recommended because this way ISPs can block outgoing SMTP on their networks but still allow users to send email to another mail server.