I am trying to forward an email using the ExchangeWebServicesClient, however I cant seem to find the email address of the current mailbox.
Is it exposed anywhere?
I am trying to forward an email using the ExchangeWebServicesClient, however I cant seem to find the email address of the current mailbox.
Hi Chris,
Hi,
Thank you for being patient towards the implementation of this feature by us.
We are pleased to inform you that we have supported this feature now. Please download this latest version of Aspose.Email for .Net v2.1.0 and use the following sample code for your requirements. It will return the email address of current Mailbox using ExchangeWebServiceClient.
ServicePointManager.ServerCertificateValidationCallback += CheckCertificate;
{
ExchangeServiceBinding service = new ExchangeServiceBinding();
{
service.Credentials = new NetworkCredential("username", "password", "domain");
service.Url = "server address";
ResolveNamesType request = new ResolveNamesType();
request.ReturnFullContactData = true;
request.UnresolvedEntry = ((NetworkCredential)service.Credentials).UserName;
request.SearchScope = ResolveNamesSearchScopeType.ActiveDirectoryContacts;
ResolveNamesResponseType response = service.ResolveNames(request);
ResolveNamesResponseMessageType responseMessageType = response.ResponseMessages.Items[0] as ResolveNamesResponseMessageType;
string emailAddress = responseMessageType.ResolutionSet.Resolution[0].Mailbox.EmailAddress;
Console.WriteLine(emailAddress);
}
}
public static bool CheckCertificate(Object sender, X509Certificate certificate, X509Chainchain, SslPolicyErrors sslPolicyErrors)
{
return true;
}
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan