Sending email failed with Caused by: javax.mail.MessagingException: [EOF]

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

Summary

Problem

Sending a test email will produce the following errors in the test mail dialog box and in the atlassian-jira-outgoing.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ... com.atlassian.mail.MailException: javax.mail.MessagingException: [EOF] at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:213) at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:44) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:57) at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:53) at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:127) at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:58) at com.atlassian.jira.mail.JiraMailQueue.sendBuffer(JiraMailQueue.java:52) ... Caused by: javax.mail.MessagingException: [EOF] at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:2080) at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:1478) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:648) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:173) ... 18 more

Diagnosis

Environment

  • Exchange Server is being used to replicate this error.

  • The test email is sent when using a different outgoing mail server. (GMAIL for example)

Cause

Usually this error is related to the Mail Exchange server's configuration. It is due to the Mail Server not being updated to allow relay from the JIRA server. Adding the JIRA server's IP to the range of allowed relay hosts resolves this.

Solution

Workaround

Use a different mail server while unable to perform this configuration changes in the Exchange server side.

Resolution

Add the JIRA server's IP to the range of allowed relay hosts. You may refer this Microsoft KB.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.