NS: SMTP. OAuth2. Logging last server response on AuthenticationFailedException.

ID:    D28019
Published:    21 September 2023

Defect Id


Originally Reported Against

SBM 12.1

Also Affects

SBM 12.1 Hotfix
SBM 12.1 Hotfix
SBM 12.1 Hotfix
SBM SBM 12.1 Hotfix


When configuring SBM to talk to an SMTP server, there are often issues with setting up the mailbox and/or AppRegistration in O365.  When this happens it is hard to identify a reason why mail server throws AuthenticationFailedException.  We have added better logging to assist/

Snippet from NS.LOG when attempting to connect to SMTP server:

2023-09-15 18:30:25,982 ERROR [QuartzScheduler_Worker-34] [] [::] -- Failed to connect to email server.
javax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect( ~[javax.mail-1.6.2.jar:1.6.2]
at javax.mail.Service.connect( ~[javax.mail-1.6.2.jar:1.6.2]
at javax.mail.Service.connect( ~[javax.mail-1.6.2.jar:1.6.2]
at ~[common-util-12.1.jar:?]
at com.serena.sbm.ns.service.MailSenderImpl.lambda$0( ~[notificationsrv-api-12.1.jar:?]
at java.util.HashMap.forEach( [?:1.8.0_342]
at com.serena.sbm.ns.service.MailSenderImpl.send( [notificationsrv-api-12.1.jar:?]
at com.serena.sbm.ns.service.EmailMessageStrategy.apply( [notificationsrv-api-12.1.jar:?]
at com.serena.sbm.ns.process.EmailMessageServiceImpl.processMessages( [notificationsrv-api-12.1.jar:?]
at com.serena.sbm.ns.process.MessageServiceImpl.process( [notificationsrv-api-12.1.jar:?]

Find Answers

Type a question or describe what you are looking for below

My Recent Searches

Welcome kb sso

Additional Assistance

  • Submit a Case Online
  • FAQs