Problem when sending email (Codeunit 400 SMTP Mail)

oetoliya
Member Posts: 9
Dear expert,
I have created a codeunit for sending email to specific customers one by one.
When the codeunit is called, it
1) Find a customer that need the email.
2) create and save a excel file on a folder.
3) Send email to customer with the excel file. (using codeunit 400 SMTP mail).
4) Next customer.
I find some string problem when sending email.
Basically, when the codeunit is processing, the mouse point will change to the loading icon and user can't click anything on NAV.
However, when the Send Email function is called the mouse point change back to arrow for a few seconds.
If i click something on NAV during this few seconds like open and close from, the codeunit will stop. The rest email won't send.
If i close NAV and open again, the codeunit seems continue to run...... :-k
I try to add a dialog box, but i can still click something on NAV when sending email.
Why the codeunit will stop process?
Is there any method to prevent user interaction before the process is end?
Many Thanks.
I have created a codeunit for sending email to specific customers one by one.
When the codeunit is called, it
1) Find a customer that need the email.
2) create and save a excel file on a folder.
3) Send email to customer with the excel file. (using codeunit 400 SMTP mail).
4) Next customer.
I find some string problem when sending email.

Basically, when the codeunit is processing, the mouse point will change to the loading icon and user can't click anything on NAV.
However, when the Send Email function is called the mouse point change back to arrow for a few seconds.
If i click something on NAV during this few seconds like open and close from, the codeunit will stop. The rest email won't send.
If i close NAV and open again, the codeunit seems continue to run...... :-k
I try to add a dialog box, but i can still click something on NAV when sending email.
Why the codeunit will stop process?
Is there any method to prevent user interaction before the process is end?
Many Thanks.
0
Comments
-
HI oetoliya,
Why Don't you use NAS for running this codeunit?
By using NAS no user interaction is required and the process can also be automated.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0
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