JIRA Outgoing Mail Fails
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products will end after February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When JIRA triggers an outgoing mail and mails are not sent however a look at the outgoing mail configuration shows the outgoing mail configuration is correct.
The following appears in the atlassian-jira-outgoing-mail.log
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2056) [javax.mail-1.5.4.jar:1.5.4]
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697) [javax.mail-1.5.4.jar:1.5.4]
at javax.mail.Service.connect(Service.java:386) [javax.mail-1.5.4.jar:1.5.4]
at javax.mail.Service.connect(Service.java:245) [javax.mail-1.5.4.jar:1.5.4]
at javax.mail.Service.connect(Service.java:194) [javax.mail-1.5.4.jar:1.5.4]
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:174) [atlassian-mail-2.5.16.jar:?]
... 25 more
Cause
The configured mail server has TLS security in place, hence you would need to select this option for JIRA to be able to use it for sending mails.
Resolution
Check the TLS option in the outgoing mail configuration page.
Confirm with your mail server admin that what you have configured is what is expected by the mail server.