This tutorial will help you transfer emails from one exchange sevrer to another using C# , EWS managed api and Visual Studio

First you need to download  exchange web service API (if you haven't downloaded it till now), which you can download from here,

Step 1 : We have to create Exchange Service instance and give the parameters like this

Here in the above code, count is initialized to count the number of mails to export.

Step 2:- download mails from source server and save it in folder in C:> drive, which we will use later, for this we should create the ExportMIMEmail function to download the mails in .eml format, and save it in local drive.
In this step you create Exchange service account using source user details


Step 3: Upload mails in Destination exchange server using destination email id


the above code will upload the downloaded .eml format mails into destination mail box, and you will be able to see it in new exchange server hence we are done.

Note: - We are not setting properties like read/flag etc for above mails.