Solved: SMTP send fails error 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied

Our backend was programmed and configured to send e-mails using Microsoft 365 SMTP. Until one day an error was logged:

Failed sending e-mail message 35922665: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message.

smtp.office365.com, port 587.

Microsoft suggested reason for this

https://docs.microsoft.com/en-us/exchange/troubleshoot/mail-delivery/mapiexceptionnotfound-ndr

Did not help us.

How did we solve the STOREDRV.Submission.Exception?

In our case the issue was related to the sender address and log in account/e-mail to SMTP being different. Yes indeed, we were using an account to send but somewhy configured another e-mail to be the sender. This had only historical reasons and no other reason. Just needed a properly managed change.

Solution was to just change our configuration to put the sender address the same as the account log in address. It was not perfect, but until further developments we managed to have our backend send the e-mails.

Links that contributed:

https://stackoverflow.com/questions/54784431/unable-to-send-smtp-mails-using-office365-settings

 

Hoping this helps someone.

Post Author: Tom Pai