【问题标题】:Exchange Web Services - ServiceResponseException after sending Email messageExchange Web 服务 - 发送电子邮件后出现 ServiceResponseException
【发布时间】:2011-01-13 12:31:06
【问题描述】:

我正在使用 EWS Managed 发送电子邮件。
这是一个代码:

EmailMessage result = new EmailMessage( mService );
result.From = from;
result.Subject = subj;
result.Body = textBody;
if ( to != null )
{
    result.ToRecipients.AddRange( StringArrayToAddresses( to ) );
}
if ( cc != null )
{
   result.CcRecipients.AddRange( StringArrayToAddresses( cc ) );
}
if ( bcc != null )
{
   result.BccRecipients.AddRange( StringArrayToAddresses( bcc ) );
}
result.Send();

在 Exchange 2007 上运行此程序时,我收到 Microsoft.Exchange.WebServices.Data.ServiceResponseException

请求未通过架构验证: 这 'http://schemas.microsoft.com/exchange/services/2006/types:EmailAddress' 元素无效 - 值 '' 是 根据其数据类型无效 'http://schemas.microsoft.com/exchange/services/2006/types:NonEmptyStringType' - 实际长度小于 MinLength 值。

在调试时,我检查了FromToRecepients 属性,它们都分配了EmailAddress

你能帮帮我吗?

谢谢!

【问题讨论】:

    标签: email exchange-server exchangewebservices exchange-server-2007


    【解决方案1】:

    对不起,解决了,我的错! 刚刚检查了密件抄送和抄送值。找到一个空字符串。

    【讨论】:

      猜你喜欢
      • 2011-04-18
      • 2011-12-03
      • 2013-08-10
      • 2017-07-28
      • 1970-01-01
      • 1970-01-01
      • 2012-07-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多