Friday, February 17, 2017

How TO use Outlook for mail in MS Dynamics NAV 2017?



Requirement :-
While using MS Dynamics NAV mail functionality sometimes a user wants to see the sent items in his Sent mail Box.
Procedure: 
You need to define the SMTP mail Setup table with your Outlook Config. By default the  Setup Values are :-


MS Dynamics NAV SMTP Setup


Step1.
Design a codeunit for the functionality or you can put the same on page also. Define a record Type variable of ID 397 For Outlook. (FOR SMTP it is 400).

Step2.
Now Just Use this code.

OutlookMail.NewMessage('ToEmail','CCEmail','BCC Email',
'ITS A TEST MAIl From NAV PLease Donot Reply','GOOD Luck','',FALSE);
OutlookMail.Send();
MESSAGE('Mail Sent');
For reference You can check.



Step3.
Now run the report your mail must be sent.

Hope you learnt it well, If you like it the please share and subscribe with our blog using email subscription so that you get the latest update of our blog on the same day.




No comments:

Post a Comment