Email using NAS and Job Queue

ebitas
Member Posts: 71
Using NAV v5.0. I have created a codeunit to call a report and save it as an HTML file. Then attaché the file and email it to specific address.
To automate the process I have sat up NAS and created a Job Queue record. The connection between NAS and the Job Queue record is successful, it runs the codeunint and an HTML file is created but for some reason it doesn't fire an email. if I run the codeunint manually everything will work fine and an email is generated.
The codeunint looks like this:
REPORT.SAVEASHTML(77016,'C:\Open Service Orders\OpenSalesOrders.htm',FALSE);
dhbAttachement := 'C:\Open Service Orders\OpenSalesOrders_Elie.htm';
Subject := 'Open Service Orders';
Body := 'Attached is a list of open service orders';
dhbEmail.NewMessage(ToName,'',Subject,Body,dhbAttachement,FALSE);
Note: I'm calling CodeUnit 397 to send the generate an email
the SingleInstance property on the codeunint is set to No.
I have checked the Job Queue Log table, the status is Success and no error messages.
Any Ideas??? Please help!!!
To automate the process I have sat up NAS and created a Job Queue record. The connection between NAS and the Job Queue record is successful, it runs the codeunint and an HTML file is created but for some reason it doesn't fire an email. if I run the codeunint manually everything will work fine and an email is generated.
The codeunint looks like this:
REPORT.SAVEASHTML(77016,'C:\Open Service Orders\OpenSalesOrders.htm',FALSE);
dhbAttachement := 'C:\Open Service Orders\OpenSalesOrders_Elie.htm';
Subject := 'Open Service Orders';
Body := 'Attached is a list of open service orders';
dhbEmail.NewMessage(ToName,'',Subject,Body,dhbAttachement,FALSE);
Note: I'm calling CodeUnit 397 to send the generate an email
the SingleInstance property on the codeunint is set to No.
I have checked the Job Queue Log table, the status is Success and no error messages.
Any Ideas??? Please help!!!
0
Comments
-
It depends upon the service account you use to run NAS. Does that user has email setup ?
If not change the service account to your login id and try.0 -
Thanks Skulla.. I have sat up an email account but I gave it a name different than the NAS windows Log In. I'll change that and let you know..
Thank you again for your reply toi my question..0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions