Options

Outlook Email is sended

brekobreko Member Posts: 4
edited 2014-02-13 in NAV Three Tier
Hello

I want to know if my e-mail is sended. Outlook is display but I have to kown if the User press the button send or close the Outlookclient without sending (broke the process).


Code in C# This code work in C# but I don't know how to implement in navision.

((Outlook.ItemEvents_10_Event)mailItem).Send += new Microsoft.Office.Interop.Outlook.ItemEvents_10_SendEventHandler(ThisAddIn_Send);
((Outlook.ItemEvents_10_Event)mailItem).Close += new Microsoft.Office.Interop.Outlook.ItemEvents_10_CloseEventHandler(ThisAddIn_Close);


Code in NAV 2013 R2 with DotNet

OutlookApplication := OutlookApplicationClass.ApplicationClass();
OutlookMailItem := OutlookApplication.CreateItem(OlItemType.olMailItem);
OutlookMailItem."To" := ToAddresses;
OutlookMailItem.CC := CcAddresses;
OutlookMailItem.Subject := Subject;
OutlookMailItem.Body := Body;
OutlookMailItem.Display(TRUE);

//Check Item Events whats happen
ItemEvents.add_Send(ItemEvents_10_SendEventHandler);
ItemEvents_10_SendEventHandler.Send(Send_Boolean);
OutlookMailItem.add_Send(ItemEvents_10_SendEventHandler);

Have somebody experience in this case. Can somebody help me?
Thanks
Sign In or Register to comment.