public static void Run() { // ExStart:ExchangeFoldersBackupToPST string dataDir = RunExamples.GetDataDir_Exchange(); // Create instance of IEWSClient class by providing credentials const string mailboxUri = "https://ews.domain.com/ews/Exchange.asmx"; const string domain = @""; const string username = @"username"; const string password = @"password"; NetworkCredential credential = new NetworkCredential(username, password, domain); IEWSClient client = EWSClient.GetEWSClient(mailboxUri, credential); // Get Exchange mailbox info of other email account ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo(); ExchangeFolderInfo info = client.GetFolderInfo(mailboxInfo.InboxUri); ExchangeFolderInfoCollection fc = new ExchangeFolderInfoCollection(); fc.Add(info); client.Backup(fc, dataDir + "Backup_out.pst", Aspose.Email.Outlook.Pst.BackupOptions.None); // ExEnd:ExchangeFoldersBackupToPST }