Connecting to Exchange Server using WebDav
Contents
[
Hide
]
Aspose.Email provides the capability to Exchange 2003 and 2007 using WebDAV protocol by exposing the ExchangeClient class. This article shows how to instantiate objects of both classes and the same method can be used in all the upcoming examples in this programming guide.
Connect to Exchange using ExchangeClient
The following code samples depict writing a custom function that can be called in code segments for instantiating ExchangeClient, which can then be used to carry out various Exchange operations.
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 | |
public static ExchangeClient getExchangeClient() { | |
// Create instance of ExchangeClient class by giving credentials | |
ExchangeClient client = new ExchangeClient("http://MachineName/exchange/Username", "Username", "password", "domain"); | |
return client; | |
} |