Dear Sir,
The following error message is occurred when I click "Test Email Setup" in the SMTP Mail Setup Page.
Microsoft Dynamics NAV
The SMTP mail system returned the following error: "Transaction failed. The server response was: 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:CF050000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:87200000, 1.36674:0E000000, 1.61250:00000000, 1.45378:8C200000, 1.44866:6C010000, 16.55847:BC0F0000, 17.43559:0000000004020000000000000000000000000000, 20.52176:140F938A1E00000000000000, 20.50032:140F938A8E1770200A002C84, 0.35180:140F938A, 255.23226:ED050000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:F2050000, 0.35250:0A000000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:70000000, 1.36674:32000000, 1.61250:00000000, 1.45378:75000000, 1.44866:01000000, 16.55847:DC000000, 17.43559:0000000000030000000000000100000000000000, 20.52176:140F938A1E0010100B060000, 20.50032:140F938A8E17000003000136, 0.35180:10060000, 255.23226:0A005389, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:4800D13D, 4.21921:DC040000, 255.27962...".
OK
But we can sent email using the same smtp setup thru custom code.
So, what is the reason of that issue ?
Kinly reply.
navuser1
Now or Never
0
Answers
But I can able to send email thru C/AL Code without any issue. The same smtp setup is used in the programming language. Then where is the actual issue ?
Yesterday, I have debugged to understand the internal matter of that issue. The Codeunit 412 SMTP Test Mail has a function called "SendTestMail", its code as under.
The above code is working fine when the smtp setup is rather than smtp.office365.com. But it is very strange to see if I replace the first "EmailAddress" by SMTPMailSetup."User ID" then it's working fine.
If you need this mailaddress to be something specific that your current mailserver does not allow you to use, you can work around this by setting up a simple SMTP-server in your network that will forward the mail for you. Else you can ask your administrator to make the restrictions less strict.
In the end this is more an issue on your mailserver then in NAV.
The problem occurs when second parameter & third parameter are same and second parameter <>SMTPMailSetup."User ID".
Did you tried debugging and see which line of code is the Issue?
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
I have the same issues on NAV2013 R2, we have changed mailbox top Office365 and emails cannot be sent.
Office365 user has account type: "Exchange online-kiosk". I'm not sure if this is related to that issue.
Error is this
---
Microsoft Dynamics NAV
Break On Error Message:
The SMTP mail system returned the following error: "Transaction failed. The server response was: 5.2.252 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:29150000, 1.36674:01000000, 1.61250:00000000, 1.45378:02000000, 1.44866:00000000, 1.36674:7A000000, 1.61250:00000000, 1.45378:05000000, 1.44866:00140000, 1.36674:0A000000, 1.61250:00000000, 1.45378:16000000, 1.44866:87260000, 1.36674:0E000000, 1.61250:00000000, 1.45378:A0260000, 1.44866:30020000, 16.55847:96120000, 17.43559:0000000030020000000000000000000000000000, 20.52176:140F54910800F01F0A001612, 20.50032:140F54917817F01F07000000, 0.35180:1F000130, 255.23226:0A000000, 255.27962:7A000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:21000000, 0.35250:1F001336, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:5A000000, 1.36674:32000000, 1.61250:00000000, 1.45378:5F000000, 1.44866:01000000, 16.55847:C6000000, 17.43559:0000000088030000000000000100000000000000, 20.52176:140F54910800101068000000, 20.50032:140...".
OK
---
Code breaks on CU408.TrySend function