I had a customer contact me this morning that they were unable to receive the workflow notifications from Business Central.
The following is the error message from the Job Queue Log Entries (Very difficult to understand!).
A call to MailKit.Net.Smtp.SmtpClient.Send failed with this message: 5.2.252 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.3
At first, I suspected that there was a problem with the email settings, but when I clicked Test Email Setup, I can receive the test email.
After a brief investigation, I found this error is actually not only found in Business Central, it belongs to Office 365.
Office 365 doesn’t provide to send emails using different from an address other than your username to log in.
To solve this problem, open the SMTP Mail Setup page and deselect the Allow Sender Substitution. Then the error will disappear. (Not selected on by default)
Allow Sender Substitution
Specifies that the SMTP server allows you to change sender name and email.
Note: From BC17, enhanced email capabilities are enabled, and your legacy SMTP settings are copied to an account on the Email Accounts page. You can use both, but there is no synchronization between the two.
Hope this will help.
Thanks for reading.