开发者

How to get To address in Exchange Web service in .NET?

开发者 https://www.devze.com 2023-02-17 03:33 出处:网络
I want to get the To Address of mail in Exchange Web service. Here is my code: string _ToAddress =string.Empty;开发者_StackOverflow

I want to get the To Address of mail in Exchange Web service.

Here is my code:

string _ToAddress =string.Empty;开发者_StackOverflow

foreach (Item _MailItem in findResults.Items)    
{
     _ToAddress = _MailItem.DisplayTo.ToString();
}

It returns alias of the mail Address like this My_Mail_Id Instead of My_Mail_Id@MyDomain.com

How to Get Mail Address as full address


To get the To address you need to load the ToRecipients property of the mail item. This property stores a collection of recipients. The property has an address field which holds the email address of the recipient.

Thanks, Niall

0

精彩评论

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