javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful

Anonymous
2020-03-17T19:24:25+00:00

Hi,

I am using a java program to send notifications to set of customers by using a Microsoft email account which I have purchased from Godaddy.

I am able to send emails when I tried with outlook windows client and thunderbird, but not with my java code.

I tried with below email properties as well

        props.put("mail.smtp.host", "smtp.office365.com");

        props.put("mail.smtp.auth", "true");

        props.put("mail.smtp.port", "587");

        props.put("mail.smtp.starttls.enable", "true");

        props.put("mail.smtp.starttls.required", "true");

        props.put("mail.smtp.ssl.protocols", "TLSv1.2");

        props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");

Is there any configuration required to be done in godaddy or in microsoft admin account?

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2020-03-18T10:12:28+00:00

    Hi JoshJoseph,

    Thank you for the posting in Microsoft Community. Based on your case description, we will try our best for helping from our side. 

    Regarding this error, at once we suggest you to try to configure “Office 365 SMTP relay” method. Here is the detailed steps information article: https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-office-3, kindly refer option 3 under this mentioned article.

    If the issue still persist, since you are using java program or code to operate such action for Outlook, so we recommend you that kindly post your question in Microsoft Office developer community, because this is our dedicated support team for this program or code related concern or question, our dedicated support team will further guide you regarding your concern. 

    We are truly appreciating your cooperation in our forum community.

    Regards,

    Darpan

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful