【发布时间】:2013-07-10 19:27:33
【问题描述】:
我正在使用 VS2010 C# 为 Outlook 2010 制作插件。
我的插件的目的是从新电子邮件中获取 To、CC、BC 从功能区按下自定义按钮并将其发布到外部 URL(其中 接受一个帖子请求)。类似于 html/jsp 中的表单如何将输入发布到 不同的页面(网址)。
到目前为止,我可以获取 To、CC、BC 并将其存储在字符串变量中。但我不 知道如何向外部网址发帖。
任何帮助将不胜感激。谢谢。
到目前为止,这是我的函数代码:
public void makePost(object Item, ref bool Cancel)
{
Outlook.MailItem myItem = Item as Outlook.MailItem;
if (myItem != null)
{
string emailTo = myItem.To;
string emailCC = myItem.CC;
string emailBCC = myItem.BCC;
if (emailTo == null && emailCC == null && emailBCC == null)
{
MessageBox.Show("There are no recipients to check.");
}
else
{
string emailAdresses = string.Concat(emailTo, "; ", emailCC, "; ", emailBCC);
//do something here to post the string(emailAddresses) to some url.
}
}
}
【问题讨论】:
标签: c# post plugins vsto outlook-2010