Hi Aspose Team
We are using Exchange server 2013 version 15.0.1293.2
And Aspose.Email 17.7 (I tried 17.9 and 17.11).
when code tries to get mailbox info Aspose throws an exception.
ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo(userEmail);
Exception
[Aspose.Email.Clients.Exchange.ExchangeException] = {"Mailbox information can not be read.\r\nFolder Id: ‘msgfolderroot’; Message: The specified object was not found in the store.\r\nFolder Id: ‘calendar’; Message: The specified folder could not be found in the store.\r\nFolder Id: ‘contacts’; Message: The s…
my Code.
{
// Initialize the ExchangeWebServiceClient class and connect
using (IEWSClient client = EWSClient.GetEWSClient(_exchangeWebServiceUrl, credential))
{
ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo(userEmail);
string contactsUrl = mailboxInfo.ContactsUri;
//TK0063150 corrected argument for contactsurl
foreach (MapiContact outlookContact in client.GetContacts(contactsUrl))
{
ContactEntity contact = new ContactEntity();
if (outlookContact.NameInfo != null)
{
contact.DisplayName = outlookContact.NameInfo.DisplayName;
contact.FirstName = outlookContact.NameInfo.GivenName;
contact.MiddleName = outlookContact.NameInfo.MiddleName;
contact.LastName = outlookContact.NameInfo.Surname;
}
if (outlookContact.ProfessionalInfo != null)
{
contact.CompanyName = outlookContact.ProfessionalInfo.CompanyName;
contact.Department = outlookContact.ProfessionalInfo.DepartmentName;
contact.JobTitle = outlookContact.ProfessionalInfo.Title;
}
if (outlookContact.ElectronicAddresses != null)
{
if (outlookContact.ElectronicAddresses.Email1 != null && outlookContact.ElectronicAddresses.Email1.EmailAddress != null)
{
contact.Email = outlookContact.ElectronicAddresses.Email1.EmailAddress.Trim();
}
}
contacts.Add(contact);
}
}
}
catch (Exception exception)
{
throw new Exception(string.Format("Exchange Error {0} ", exception.Message), exception);
}
Please advise as soon as possible