Access Shared mailbox on Exchage Server 2013

Hello Aspose team,

We are using Exchage Sever 2013
We are using IEWSClient to access mailbox on exchange server.

This is the way how I create client:
NetworkCredential credentials = new NetworkCredential(UserName, Password, Domain);
IEWSClient mailClient = EWSClient.GetEWSClient(SeverHost, credentials);

This is the way how I list messages in specific folder (Inbox or any others):
string folderUri = GetSubFolderUri(pSubfolderName, false);
MailQuery mq = BuildMailQuery(pFromAddress, pFromName , pTo, pSubject, pBody, pHasAttachments, pStatus, pFromDate, pToDate);
var mails = mailClient.ListMessages(folderUri, pMaxResult, mq)

I need help with shared mailbox access
On exchange server my account has permissions to list messages from shared mailbox.
How can I list messages from shared mailbox using AsposeAPI?
Any help , code samples etc will be useful.
Thanks a lot
George

Hi George,


Thank you for contacting Aspose support team.

Aspose.Email provides access to shared accounts using sample code given below:

// Create instance of EWSClient class by giving credentials
Aspose.Email.Clients.Exchange.WebService.IEWSClient client = Aspose.Email.Clients.Exchange.WebService.EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain");

// Get Exchange mailbox info of other email account
Aspose.Email.Clients.Exchange.ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo("otherUser@domain.com");

You may please go through the article sub-section here for more details and feel free to write us back if you have any other query in this regard.