Skip to end of metadata
Go to start of metadata
Contents Summary
  

In order to connect to Exchange servers 2007, 2010 and 2013 using Exchange Web Service, it provides the IEWSClient interface that implements the EWSClient class. The EWSClient.GetClient method instantiates and returns an IEWSClient object that is further used to perform operations related to an Exchange mailbox and other folders. This article shows how to instantiate objects of {{EWSClient}} and the same method can be used.

Connecting to Exchange Server using EWS

The following code snippet shows you how to connect using connect using Exchange Web Service (EWS).

 

Connecting to Exchange Server using IMAP

Microsoft Exchange Server supports the IMAP protocol for accessing items in a mailbox. Use Aspose.Email's ImapClient class to connect to the Exchange Server using IMAP protocol. For more information about the ImapClient class. First, make sure that IMAP services are enabled for your Exchange Server:

  1. Open the Control Panel.
  2. Go to Administrator Tools, then Services.
  3. Check the status of the Microsoft Exchange IMAP4 service.
  4. If it is not already running, enable/start it.

The following code snippet shows you how to connect and list messages from Inbox folder of microsoft exchange server using IMAP protocol.

 

 

The following code snippet shows you how to uses SSL, modify the above code as follows:

 

 

After connecting to an Exchange server using IMAP and getting the IMapMessageInfoCollection, The following code snippet shows you how to use the MessageInfo object's sequence number to save a specific message as follow:

 

Labels
  • No labels