OutgoingEmailAuthenticationError error shows in Microsoft Dynamics 365 mailbox alert

This article provides a resolution for the OutgoingEmailAuthenticationError error that occurs in a Microsoft Dynamics 365 mailbox alert.

Applies to:   Microsoft Dynamics 365 Customer Engagement Online
Original KB number:   4533293

Symptoms

An alert with a message like the following appears in a Microsoft Dynamics 365 mailbox:

"Email cannot be sent for mailbox "Your mailbox is now connected to Dynamics 365" because either a server certificate needed to connect to the email server could not be validated or the credentials used to send email are incorrect or do not provide access. Mailbox "Your mailbox is now connected to Dynamics 365" didn't synchronize. A notification about this is posted on the alerts wall for the owner of the email server profile [Profile Name].

Email Server Error Code: OutgoingEmailAuthenticationError"

If you select Details, the following additional information appears:

ActivityId: [GUID]
Error : MailKit.Security.AuthenticationException: 535: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/?p=BadCredentials x9sm13491053pgt.66 - gsmtp ---> MailKit.Net.Smtp.SmtpCommandException: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/?p=BadCredentials x9sm13491053pgt.66 - gsmtp
--- End of inner exception stack trace ---
at MailKit.Net.Smtp.SmtpClient.<AuthenticateAsync>d__65.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MailKit.Net.Smtp.SmtpClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
at MailKit.MailService.Authenticate(Encoding encoding, String userName, String password, ...

Cause

This error can occur if you are using a POP3/SMTP email server profile configured for Gmail.

Resolution

Try following the steps from the Gmail article Check Gmail through other email platforms.

Third-party information disclaimer

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.