Auto E-Mail to Customer

sneha
Member Posts: 191
Hi ,
When user ships Sales Order, want to send automatic E-Mail to customer. Can you please give me some ideas, if it already discussed?
When user ships Sales Order, want to send automatic E-Mail to customer. Can you please give me some ideas, if it already discussed?
0
Comments
-
You could modify codeunit 81 as follows:
//SalesPost.RUN(SalesHeader);
IF Ship THEN BEGIN
if SalesPost.RUN(SalesHeader) THEN
EmailCust(SalesHeader);
END ELSE
SalesPost.RUN(SalesHeader);
******
You need to add a function to codeunit 81 EmailCust. It would use the Mail codeunit 397.
It would be something like:
Cust.GET(SalesHeader."Sell-To Customer No.");
IF Cust."E-Mail" <> '' THEN BEGIN
BodyText := 'Whatever you want to say, perhaps include sales order no.';
Mail.NewMessage(ECust."E-Mail" ,'',You Order has shipped',BodyText,'',FALSE);
END;
END;0 -
If you are on release 5, you should look at using codeunit 400 instead of 397. It provides more flexibility.
If you want to send a pdf copy of the invoice, then you have to print the invoice to a pdf then attach it to the email.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
I would make the emailing a separate process. Waiting on sending email will slow down posting.
Write another processing report that will mark the posted document and then email the notification.0 -
Karenh wrote:You could modify codeunit 81 as follows:
//SalesPost.RUN(SalesHeader);
IF Ship THEN BEGIN
if SalesPost.RUN(SalesHeader) THEN
EmailCust(SalesHeader);
END ELSE
SalesPost.RUN(SalesHeader);
******
You need to add a function to codeunit 81 EmailCust. It would use the Mail codeunit 397.
It would be something like:
Cust.GET(SalesHeader."Sell-To Customer No.");
IF Cust."E-Mail" <> '' THEN BEGIN
BodyText := 'Whatever you want to say, perhaps include sales order no.';
Mail.NewMessage(ECust."E-Mail" ,'',You Order has shipped',BodyText,'',FALSE);
END;
END;
I followed your idea. At the same time I keep in mind ara3n advice. In this scenario, I need some more help on
1. How can I default From Address (irrespective of user)?
2. How to add signature in outlook body (default)?0 -
Hi All,
I have the same question as to how can I define the Email From address(irrespective of user) using MAIL codeunit?
Working in NAV 4 (SP3) native database.
0 -
you need codeunit 400 to specify the from address. If your license includes release 5, then export codeinit 400 from a release 5 datebase and import it into your release 4.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Codeunit 400 is not that flexible... It only uses port 25 for SMTP. Which most ISP blocks because of spammers.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I've had great success with a product called ANSMTP from http://www.emailarchitect.net. This company has email libraries for ActiveX/COM/.NET/etc for both SMTP and POP applications. I do not have a lot of experience with developing ActiveX/.NET apps (strictly a C/Side guy), but I was able to build some very sophisticated email capabilities into NAV. I also built an email template form where the users could type in a template for an email message, giving them the ability to modify the text of the message easily.
ANSMTP has access to every field in an email, e.g. "From Address", "To Address" "cc address", "subject", "body", etc. The documentation is excellent and their website has dozens of examples in VB, VBA, .NET, etc. Their email support is very responsive, and the package is only $150 for a single developer (multiple clients), and you can download and use any of their libraries for 30 days for free.
Regards,
RonRon0 -
you can use Jmail and it has similar capabilities. and there are example available on mibuso.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