EWS-弹出要发送的电子邮件 [英] EWS -- Pop up email to be sent

查看:101
本文介绍了EWS-弹出要发送的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够在本地桌面应用程序中使用Exchange Web服务托管API创建新电子邮件。这些消息包含产品和服务的报价。我现在想做的是在发送电子邮件之前打开电子邮件,以便用户可以编辑然后自己发送电子邮件。所有用户都具有Outlook 2013。

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.

推荐答案

如果需要Web客户端访问,则应查看互操作库而不是EWS 。 EWS可以在没有客户端交互的情况下无头运行(因此无法在Outlook中打开对话框)。

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).

在interop库中执行此操作的示例如下所示:

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);

这篇关于EWS-弹出要发送的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆