Read Emails from Other User's Mailbox using WebDav
Contents
[
Hide
]
Some accounts on Exchange Servers have the right to access multiple mailboxes, and some users have multiple email accounts on the same Exchange Server. In both cases, users can access other user’s mailboxes using Aspose.Email for Java. This API provides a mechanism for accessing folders and emails from other mailboxes using the ExchangeClient class.
The code snippet below demonstrates how to use the ExchangeClient class to access another mailbox.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-Java | |
// Create instance of ExchangeClient class by giving credentials | |
ExchangeClient client = new ExchangeClient("http://MachineName/exchange/Username", "Username", "password", "domain"); | |
// Get Exchange mailbox info of other email account | |
ExchangeMailboxInfo mailboxInfo = client.getMailboxInfo("otherUser@domain.com"); |