It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trying to configure Outgoing Mail using Office365 SMTP server...

We are having trouble completing the mail configuration for SMTP and Incoming mail with Office 365. After complete the SMTP setup and test we receive a successful connection. However, when sending a test message we receive an error. 

"530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL"

The other other issue is incoming mail setup. We have tried Secure (POP and IMAP) and both option fails with error:

"AuthenticationFailedException: AUTHENTICATE failed."


6 answers

1 accepted

2 votes
Answer accepted

Hi Shoaib,  so I did this the other day.   What I’ve done is point at the mx record address for your domain.  You can use mx to figure out what that is, but typically <domainkey>  

Leave it at port 25 and tick tls to enable.   

Leave the username and pw blank.   

Now - you may have to whitelist the public ip your server is coming from to allow mail in via the office 365 exchange admin tools.  


This setup im running perfectly on jira / confluence/ bitbucket at 2 sites. 

hi Andrew, Thank for the quick response. I tried increasing the timeout to 500000 but receive the same error message "530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM". We are using Office 365 as our mail provider. 

I've configured the credentials to the account is correct and able to send from the mailbox without issue. 

0 votes
Andy Heinzer Atlassian Team Jul 18, 2018

Hi @Shoaib Qureshi

I did some more searching on this, thanks for mentioning the office365 aspect here.  Please take a look at this related post from Microsoft's Answers site:

On that post, Taranvir indicates that this specific error message means the client (JIRA) can't direct send mail to the address you have posted there.  As such you will likely need to reach out to mail admin in order to see if an MX record needs to be adjusted so that you direct send mail with Jira.

I've tried several different configuration method using Office 365 SMTP as well as Direct Send options. Jira still gives the same error message when trying to send a test message. The setup cannot be this troublesome. The error message indicates "Client was not authenticated to send anonymous mail" and I do not under why. We have a dedicated account assigned and have confirmed the credentials are correct. 

Protocol: SMTP


SMTP Port: 587

Timeout: 50000 


Password: xxxxxxxxxx

Test connection and received "The connection was successful."

Sending a test message receive error: 

"An error has occurred with sending the test email:
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 []"

None of the documentation provided has helped. 

Do we have an update regarding this issue since I'm tried all the above recommendations ... no luck ?

Gregory's comment is correct, there's also some more information in my comment on the following if this helps you:

Hi Shoaib,

this error message appears because Microsoft's mail servers expect your server to upgrade the plaintext SMTP connection to an encrypted channel via STARTTLS (don't mistake this with the "TLS" checkbox in the server configuration, as this establishes an SSL/TLS connection before sending SMTP protocols). STARTTLS support is not activated by default in your Jira instance. I activated it by adding "-Dmail.smtp.starttls.enable=true" to the START_JIRA_JAVA_OPTS in my script:

export START_JIRA_JAVA_OPTS="-Datlassian.plugins.startup.options='${@}' -Dmail.smtp.starttls.enable=true"

After restarting the Jira, the issue was resolved for me.

Hope that helps

Hi @tapirteam - this helped me resolve my SMTP Server configuration using Email This Issue app in Jira Cloud.

Much appreciated!



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Desk

The Complete Guide to Atlassian for ITSM

Hi Atlassian Community! This is Teresa from the Atlassian team. My colleague Paul Buffington @Buff and I are excited to share a brand new ITSM resource we’ve created – "The Complete Guide to At...

1,084 views 7 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you