【问题标题】:Sent Outlook draft from other Computer从其他计算机发送 Outlook 草稿
【发布时间】:2014-09-26 14:33:01
【问题描述】:

我在 Exchange Server 上获得了电子邮件帐户和那种情况。我开始我的 计算机 Outlook(连接到此电子邮件)运行此代码。电子邮件将创建并保存在草稿中。那工作正常。

然后我拿我的笔记本(连接到同一个帐户)并尝试从草稿中发送它。收到错误的电子邮件地址,但它看起来像正确的地址"test@test.com"。如果我删除它并从我的键盘上再次输入相同的地址"test@test.com" 它可以工作。我得到了 Windows 7,`Outlook 2013 with disabled Cached Exchange Mode。

_OutlookApplication = New Microsoft.Office.Interop.Outlook.Application
Dim mailItem = CType(_OutlookApplication.CreateItem(OlItemType.olMailItem), MailItem)

mailItem.Recipients.Add("test@test.com")
mailItem.Body ="Text"
mailItem.Subject = "Subject"
mailItem.Save()

我为什么要重新输入地址?我该如何解决?

【问题讨论】:

    标签: email outlook exchange-server


    【解决方案1】:
    _OutlookApplication = New Microsoft.Office.Interop.Outlook.Application
    Dim mailItem = CType(_OutlookApplication.CreateItem(OlItemType.olMailItem), MailItem)
    Dim _TestRec As Recipient
    
    _TestRec=mailItem.Recipients.Add("test@test.com")
    _TestRec.AddressEntry.Address = "test@test.com"
    
    mailItem.Body ="Text"
    mailItem.Subject = "Subject"
    mailItem.Save()
    

    问题是 - mailItem.to 仅设置显示名称。只需创建一个 Recipient 并设置 Recipient.AddressEntry.Address mailItem.Recipients.Add("test@test.com")

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-03
      • 1970-01-01
      • 2021-08-19
      • 1970-01-01
      • 2018-01-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多