on-internet
← Community

Send mail via Java API for Office 365

Stack Overflow ·

I am developing a Java application that will send mail to multiple recipients via Java Mail API(1.6.2). I have configured the SMTP as per the Microsoft docs. The problem is the code is working with my personal Hotmail email ID but it fails for my corporate Office 365 account: Error: javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [PN1PR0101CA0066.INDPRD01.PROD.OUTLOOK.COM] POP and IMAP are working (receiving mails), and I can log in with the password in Office 365 Web. I have tried changing the password too. Code: User user = Credentials.ACC; Properties props =

Comments

Sign in or sign up to comment and upvote.

No comments yet.