Hi -
I have a very simple code in a report which is as follows in NAV 2016. When I execute this code I get the an error showed below after the code. SMTP mail setup table has been setup correctly and test email works just fine and the sender email is a super user within NAV.
Any help is highly appreciated.
UserSetup.RESET;
UserSetup.SETRANGE("User ID",USERID);
UserSetup.SETFILTER("POS From E-Mail",'<>%1','');
UserSetup.SETFILTER("POS To E-Mail",'<>%1','');
IF UserSetup.FIND('-') THEN BEGIN
//Create Subject text for email
SubjectText := 'POS-AP Transaction has been created dated :'+' '+FORMAT(TODAY);
//Create body text for email
BodyText := 'A POS File was created for the above date. Please review.';
//Address the mail
Mail.CreateMessage('POS',UserSetup."POS From E-Mail",UserSetup."POS To E-Mail",
SubjectText,BodyText,FALSE);
//Send out email
Mail.Send;
Error Message
The SMTP mail system returned the following error:"Mailbox unavailable. The Server response was:
5.7.60 SMTP; Client does not have permission to send as this sender.
Many Thanks
RJ.
0
Answers
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
So Your system administrator should solve this issue