Sending test email from Jira server fails with SMTPSendFailedException error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

The Test Connection for Outgoing Mail server is successful. But when sending Test Email (with SMTP logging box checked) it fails with the following error:

com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
    
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:213) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:150) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.support.tools.salext.mail.AbstractSupportMailQueueItem.send(AbstractSupportMailQueueItem.java:61) [?:?]
	at com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem.send(SupportRequestMailQueueItem.java:56) [?:?]
	at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:51) [JiraMailQueue$1.class:?]
	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:48) [JiraMailQueue$1.class:?]
	at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:110) [DefaultVelocityRequestContextFactory.class:?]
	at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:50) [DefaultBaseUrl.class:?]
...

Diagnosis

From the atlassian-jira-outgoing-mail.log:

2016-03-11 09:56:47,557 WARN [] Sending mailitem com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem@6c57ea6 pkallam 596x2890x1 jt6xb5 10.111.3.146 /secure/admin/MailQueueAdmin.jspa An error has occurred whilst closing the connection to the outgoing mail server: AA ServiceDesk Out. This could be caused by a time-out on closing this connection, increase the timeout in smtp server configuration. Alternatively, set the 'mail.smtp.quitwait' (or 'mail.smtps.quitwait' for ssl) system property to false.
javax.mail.MessagingException: Can't send command to SMTP host;
      nested exception is:
    	java.net.SocketException: Software caused connection abort: socket write error
	at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2163) [mail-1.4.5.jar:1.4.5]
	at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:2150) [mail-1.4.5.jar:1.4.5]
	at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:1220) [mail-1.4.5.jar:1.4.5]
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:183) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:150) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.support.tools.salext.mail.AbstractSupportMailQueueItem.send(AbstractSupportMailQueueItem.java:61) [plugin.2238643682187341319.stp-3.7.22_1457584780532.jar:3.7.22]
	at com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem.send(SupportRequestMailQueueItem.java:56) [plugin.2238643682187341319.stp-3.7.22_1457584780532.jar:3.7.22]
...
2016-03-11 09:56:47,557 ERROR [] Sending mailitem com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem@6c57ea6 pkallam 596x2890x1 jt6xb5 10.111.3.146 /secure/admin/MailQueueAdmin.jspa Error occurred in sending e-mail: com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem@6c57ea6
com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
    
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:213) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:150) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.support.tools.salext.mail.AbstractSupportMailQueueItem.send(AbstractSupportMailQueueItem.java:61) [?:?]
	at com.atlassian.support.tools.salext.mail.SupportRequestMailQueueItem.send(SupportRequestMailQueueItem.java:56) [?:?]
	at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) [atlassian-mail-2.5.6.jar:?]
	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:51) [JiraMailQueue$1.class:?]
	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:48) [JiraMailQueue$1.class:?]
	at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:110) [DefaultVelocityRequestContextFactory.class:?]
	at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:50) [DefaultBaseUrl.class:?]
...

Cause

The error that is being shown at the Test Email page is not accurate enough for troubleshooting. The exact cause is the timeout is too short for the SMTP server connection and authentication.

Resolution

Increasing the value in increments of 10000 (10 seconds) is suggested until the errors are resolved. We also recommend contacting the network administrator to isolate any causes of network traffic slowness. For example, an Anti-virus application scanning all outbound traffic may contribute to this behavior. For more information, please refer to Read timed out error when sending outbound mail from JIRA applications. 


DescriptionThe Test Connection for Outgoing Mail server is successful. But when sending Test Email (with SMTP logging box checked) it fails with an error
ProductJira
PlatformServer
Last modified on Sep 25, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.