javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [SG2PR06CA0118.apcprd06.prod.outlook.com]

Anonymous
2018-08-13T03:10:29+00:00

I have tried changing the password but nothing worked. Please provide an update. 

Email log from my Java application is below.

DEBUG: setDebug: JavaMail version 1.4.7

Current processing batch no:1

Sending BCC e-mail.

Sending to SMTP server ....

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]

DEBUG SMTP: useEhlo true, useAuth true

DEBUG SMTP: useEhlo true, useAuth true

DEBUG SMTP: trying to connect to host "smtp.office365.com", port 587, isSSL false

220 SG2PR06CA0118.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 13 Aug 2018 03:07:08 +0000

DEBUG SMTP: connected to host "smtp.office365.com", port: 587

EHLO <IP>

250-SG2PR06CA0118.outlook.office365.com Hello [IP]

250-SIZE 157286400

250-PIPELINING

250-DSN

250-ENHANCEDSTATUSCODES

250-STARTTLS

250-8BITMIME

250-BINARYMIME

250-CHUNKING

250 SMTPUTF8

DEBUG SMTP: Found extension "SIZE", arg "157286400"

DEBUG SMTP: Found extension "PIPELINING", arg ""

DEBUG SMTP: Found extension "DSN", arg ""

DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

DEBUG SMTP: Found extension "STARTTLS", arg ""

DEBUG SMTP: Found extension "8BITMIME", arg ""

DEBUG SMTP: Found extension "BINARYMIME", arg ""

DEBUG SMTP: Found extension "CHUNKING", arg ""

DEBUG SMTP: Found extension "SMTPUTF8", arg ""

STARTTLS

220 2.0.0 SMTP server ready

EHLO 192.168.5.141

250-SG2PR06CA0118.outlook.office365.com Hello [115.42.245.38]

250-SIZE 157286400

250-PIPELINING

250-DSN

250-ENHANCEDSTATUSCODES

250-AUTH LOGIN XOAUTH2

250-8BITMIME

250-BINARYMIME

250-CHUNKING

250 SMTPUTF8

DEBUG SMTP: Found extension "SIZE", arg "157286400"

DEBUG SMTP: Found extension "PIPELINING", arg ""

DEBUG SMTP: Found extension "DSN", arg ""

DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

DEBUG SMTP: Found extension "AUTH", arg "LOGIN XOAUTH2"

DEBUG SMTP: Found extension "8BITMIME", arg ""

DEBUG SMTP: Found extension "BINARYMIME", arg ""

DEBUG SMTP: Found extension "CHUNKING", arg ""

DEBUG SMTP: Found extension "SMTPUTF8", arg ""

DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 

AUTH LOGIN

334 VXNlcm5hbWU6

dGVzdC13c2hjQHRhbC5zZw==

334 UGFzc3dvcmQ6

RGFqMTc3NjM=

535 5.7.3 Authentication unsuccessful [SG2PR06CA0118.apcprd06.prod.outlook.com]

javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [SG2PR06CA0118.apcprd06.prod.outlook.com]

Going to sleep for 1min(s)

at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:826)

at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:761)

at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:685)

at javax.mail.Service.connect(Service.java:317)

at javax.mail.Service.connect(Service.java:176)

at javax.mail.Service.connect(Service.java:125)

at javax.mail.Transport.send0(Transport.java:194)

at javax.mail.Transport.send(Transport.java:124)

Outlook | Windows | Classic Outlook for Windows | For home

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

13 answers

Sort by: Most helpful
  1. Anonymous
    2018-08-13T03:15:11+00:00

    HI, Which service are you using? Are you configuring SMTP relay?

    19 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2018-08-13T03:55:12+00:00

    Hi,

    Thanks for the prompt reply. We don't use any relay server and just send direct email using smtp.office365.com.

    0 comments No comments
  3. Anonymous
    2018-08-13T03:57:21+00:00

    Thanks, Does it work before? There are three ways to configure it. Which one are you using?

    I added a link as a reference.

    https://support.office.com/en-us/article/how-to...

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2018-08-13T04:01:46+00:00

    We are testing it for the first time and configured option 1.

    0 comments No comments
  5. Anonymous
    2018-08-13T04:05:34+00:00

    The first one required an Office 365 account. Did you purchase an Office 365 subscription? Office 365 must include exchange online service.

    0 comments No comments