javax.mail.MessagingException when using "Send a Test Email" in JIRA

Kurt Frank July 20, 2011

In JIRA Administration I set up my SMTP server and when I click the Test Connection button I get back that "The connection was successful." But when I am trying to add users to JIRA and email them thier password they don't get any email.

When I try to Send a Test Email from the Administration / Mail Servers/ SMTP Mail Server I get this in my Mail log.

An error has occurred with sending the test email:

com.atlassian.mail.MailException: javax.mail.MessagingException: [EOF]

at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169)

at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:93)

... long call stack
Caused by: javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at alt.javax.mail.TransportImpl.send(TransportImpl.java:18)

3 answers

0 votes
hsuhailah
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2012

Usually the error is related to Mail Exchange (server) configuration. It is due to Mail Server not being updated to allow relay from this server. But when adding JIRA server's IP to the range of allowed relay hosts, it works fine. Try to add JIRA server's IP to the range of allowed relay hosts and see how it goes.

Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2012

As Hanis says, validate your smtp server, its probably not working, though that error is not one I've seen before.

JIRA aside, you can use telnet to validate your smtp server works...

http://www.yuki-onna.co.uk/email/smtp.html

0 votes
Pepe
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2011

Does your SMTP server you ssl? If so set up a JDNI in your conf/server.xml file like so:

http://confluence.atlassian.com/display/JIRA/Using+Gmail+as+a+JIRA+Mail+Server

I doubt its the case because your connection test succedded but still good to know.

0 votes
Jim Birch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 20, 2011

Set -Dmail.debug=true and restart JIRA. This will log the exchange with the mail server and should thus display the error.

(see http://confluence.atlassian.com/display/JIRA/Logging+email+protocol+details)

A likely cause is that the mail server prohibits relays. You might have to whitelist your Jira server for relay at the mailserver. Test connection will only check for a normal response from the mail server. Sending a mail will actually test the ability to onsend mail.

Suggest an answer

Log in or Sign up to answer