1
votes

I am able to create new emails using Exchange Web Service Managed API in a local desktop application. These messages contain quotes for products and services. What I want to do now is open the email before sending it so the user can edit and then send the email themselves. All users have Outlook 2013.

1

1 Answers

1
votes

If you need web-client access, you should be looking at the interop libraries and not EWS. EWS is meant to be run headless without client interaction (and therefore cannot open dialogs in Outlook).

An example of doing so in the interop library would look something like:

Outlook.Application outlook = new Outlook.Application();
Outlook.MailItem email = outlook.CreateItem(Outlook.OlItemType.olMailItem)
                         as Outlook.MailItem;
email.To = "[email protected]";
email.Subject = "Your Quote";
email.Body = "Here is your quote.";
email.Attachments.Add(@"C:\quotes\quote.pdf", Outlook.OlAttachmentType.olByValue,
                      Type.Missing, Type.Missing);
email.Display(false);