NAV 2016 Email Error
rnjbng
Member Posts: 82
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.
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
-
seems to be a mail server setup issue. maybe a relying issue.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/0 -
Thanks archer89, I will have our client review their mail server setup and also have them check their mail relay. Thanks again for your prompt response.0
-
Connection to smtp server uses login credentials on smtp setup screen. But the email seems that it is going to be sent from another account -usersetup.pos from email field. So the account on smtp setup screen should have permission of 'send email on behalf of usersetup.'pos from email'. To check this, you may try this:enter credentials of usersetup.'pos from email' into smtp setup screen and try sending again. This time email will be sent properly.
So Your system administrator should solve this issue0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
