SMTP Error sending email 5.2.0 SendAsDeniedException with Office365

Hello,

I searched the forum and I do not see any error like the one that appears in NAV.

I have configured my Office365 account on the SMTP page and when I push send test emails button and send it to the same email address that i configured, no error appears. But if I push the test button again and send it to other address I get the error that I attached below (5.2.0 STOREDRV.Submission.Exception: SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Can not submit message).

g5adpgetcba9.jpg

Other times I solved the error by changing the Office365's password account for a new one, but I do not know if this temporary solution is correct or we need to configure something else.

Can we do something else?
Thanks for everything.

Answers

  • nav_studentnav_student Posts: 170Member
    Did you try from Powershell?

    Open it as an Administrator and use the following command
    Send-MailMessage –From [email protected] –To [email protected] –Subject “Test Email” –Body “Test SMTP Relay Service” -SmtpServer smtp.office365.com -Credential $msolcred -UseSsl -Port 587
    
    Does it work?

    which version are you using?
    On NAV2016 when you click Test Email Setup (SMTP Mail Setup) I believe the FromAddress and the SenderAddress are the same which it doesn't make any sense and then generates the error message that you sent. You could confirm it using the debugger.

    On NAV2018 the message is different. Only asks for the SenderAddress which makes more sense. Because it will pick up FromAddress from the SMTP Mail Setup
    Choose the email address that should receive a test email message:
Sign In or Register to comment.