【问题标题】:which account is selected in "FROM" in VSTO outlook 2010 while sending new email?发送新电子邮件时,在 VSTO Outlook 2010 的“FROM”中选择了哪个帐户?
【发布时间】:2013-06-17 21:59:29
【问题描述】:

我正在使用 VSTO (visual studio 2010) 为 Outlook 2010 开发一个插件。我正在处理邮件项目并希望获得新的电子邮件属性并在发送新电子邮件时在某些条件下做一些工作,我可以获得一些属性,例如subjectbodyToCC、@ 987654325@,Category。但我无法获得一些属性,例如"From"Attachment (have or not)attachment size and namechecked as high importance or notchecked as sensitivity or notrequest deliveryrequest read recipt... 和其他一些属性.... 以下是我使用的代码:

        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            Application.ItemSend+=new Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend);
        }
        void Application_ItemSend(object Item, ref bool Cancel)
        {
            Outlook.Recipient recipient = null;
            Outlook.Recipients recipients = null;
            Outlook.MailItem mail = Item as Outlook.MailItem;
            string selectedAccount= ?????
        }

如何获得后者的属性?

【问题讨论】:

    标签: visual-studio-2010 vsto outlook-addin outlook-2010


    【解决方案1】:

    发件人名称仅在邮件发送并移动到已发送邮件文件夹后设置。您最早可以访问与发件人相关的属性是当 Items.ItemAdd 事件在 Sent Items 文件夹上触发时。

    要访问附件,请使用 MailItem.Attachments 集合。

    帐户 - 使用 MailItem.SendUsingAccount 属性。

    Sensitivity、OriginatorDeliveryReportRequested 和 ReadReceiptRequested 属性有什么问题?

    【讨论】:

    • 致 dmitry:谢谢,我只是不知道属性名称。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-10
    • 2021-07-20
    • 2017-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多