Unable to Send Email with SMTP Server via SSL '530 5.7.0 Must issue a STARTTLS command first' Due to 'mail.smtp.starttls.enable' Property
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on 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
Symptoms
When sending a test email via an SSL connection (configured as a JNDI resource), mail won't be sent and the following error message is displayed:
1
2
com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException:
530 5.7.0 Must issue a STARTTLS command first.
Environment
Jira Server/Data Center on any version from 8.0.0.
Cause
In the JNDI SMTP resource configuration, mail.smtp.starttls.enable
isn't turned on.
Resolution
Enable TLS option when Configuring JIRA's SMTP Mail Server to Send Notifications
JIRA 4.4 and earlier - Click here to expand...
Double check if "JNDI Location" is specified in SMTP Server Setup
Edit <JIRA_Installation_Home>/conf/server.xml (Standalone) or <Catalina_Home>/conf/server.xml (Ear/War)
In the SmtpServer resource section, set
mail.smtp.starttls.enable
as "true" and configuremail.smtp.socketFactory.class
property. A resource configuration sample is shown as below:
1
2
3
4
5
6
7
8
9
10
11
<Resource name="mail/SmtpServer"
auth="Container"
type="javax.mail.Session"
mail.smtp.host="mail.mycompany.com"
mail.smtp.port="587"
mail.smtp.auth="true"
mail.smtp.user="jira@mycompany.com"
password="mypassword"
mail.smtp.starttls.enable="true"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>
Was this helpful?