开发者

Exchange Web Services - ServiceResponseException after sending Email message

I am using EWS Managed to send email.

Here is a code:

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();

While running this on Exchange 2007 I am receiving Microsoft.Exchange.WebServices.Data.ServiceResponseException:

The request failed schema validation: The 'http://schemas.microsoft.com/exchange/services/2006/types:EmailAddress' element is invalid - The value '' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:NonEmptyStringType' - The actual length is l开发者_JAVA百科ess than the MinLength value.

While debugging, I have checked From and ToRecepients properties, both have EmailAddress assigned.

Can you help me?

Thank you!


Sorry, its solved, my mistake! Just have checked Bcc and Cc values. Found an empty string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜