Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Shoaib Qureshi July 13, 2018

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

7 votes
Answer accepted
Gregory Van Den Ham
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, 2018

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 toolbox.com to figure out what that is, but typically <domainkey>.mail.protection.outlook.com.  

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. 

0 votes
tapirteam February 1, 2020

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 start-jira.sh 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

Doods Perea February 17, 2020

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

Much appreciated!

Thanks!

Doods

0 votes
Jhotly Debrosse November 18, 2018

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

Peter Hamilton-Harding December 12, 2018

Gregory's comment is correct, there's also some more information in my comment on the following if this helps you:
https://community.atlassian.com/t5/Jira-Service-Desk-questions/How-do-I-set-up-an-Office-365-email-account-for-Jira-Service/qaq-p/824599

0 votes
Shoaib Qureshi July 19, 2018

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

HostName: smtp.office365.com

SMTP Port: 587

Timeout: 50000 

User: validuser@domain.com

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 [CO2PR04CA0122.namprd04.prod.outlook.com]"

None of the documentation provided has helped. 

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 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:

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_outlook-mso_winother-mso_o365b/client-was-not-authenticated-to-send-anonymous/d405bcb0-f40c-42fa-b1b2-477597100123

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.

0 votes
Shoaib Qureshi July 17, 2018

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. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events