问题
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:
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 = "client@rfq.com";
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);
来源:https://stackoverflow.com/questions/29899527/ews-pop-up-email-to-be-sent