0

我正在从 MIME 数据加载现有电子邮件,有时会收到此错误。

例如:

EmailMessage ewsMsg = new EmailMessage(service); // service is ExchangeService instance
ewsMsg.MimeContent = new MimeContent("UTF-8", mimeBytes);
ewsMsg.Send(); // ServiceRemoteException here

导致此异常发生的 mimeBytes 的标头部分:

From: Microsoft Outlook
    <MicrosoftExchange329e71ec88ae4615bbc36ab6ce41109e@contoso.com>
To: Arno Bost <ArnoB@contoso.com>
Subject: Undeliverable: 
Thread-Index: AQHR3esBLcRFBp+/o0msZmG72Y4S8aAeRn0L
Date: Mon, 18 Jul 2016 18:32:08 +0400
Message-ID: <fa80f868-17fe-40d1-8501-f88c836bb2d8@SLC-DC01.contoso.com>
References: <3F10E8D8921E424C8D867E5F1F5A9F1F0311848916@SLC-DC01.contoso.com>
In-Reply-To:
 <3F10E8D8921E424C8D867E5F1F5A9F1F0311848916@SLC-DC01.contoso.com>
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 05
X-MS-Exchange-Organization-AuthSource: SLC-DC01.contoso.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator:
Content-Type: multipart/report;
    boundary="_000_fa80f86817fe40d18501f88c836bb2d8SLCDC01contosocom_";
    report-type=delivery-status
MIME-Version: 1.0

其他电子邮件发送成功。这是否意味着 Exchange 不能以这种方式发送多部分/报告电子邮件?

我不确定这是由多部分/报告内容类型引起的,也许这只是一个巧合,但目前我没有其他想法,因为具有其他内容类型(不是交付报告)的电子邮件似乎不会导致此异常。

4

0 回答 0