We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Backing Exchange Server folder to PST

Hi,


Is there anyway I can add a collection of exchange servers to PST as backup?

Hi Robert,

I think you are wanted to mention how to backup Exchange server folders to PST. If it is so, you can use Aspose.Email API to backup specified Exchange Server folders to PST file. Please have a look at the following code sample for your kind reference and let us know your feedback.

Sample Code:

// 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 email account
ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo();

ExchangeFolderInfo info = client.GetFolderInfo(mailboxInfo.InboxUri);

ExchangeFolderInfoCollection fc = new ExchangeFolderInfoCollection();

fc.Add(info); //you can add further folders to this collection

client.Backup(fc, "Backup.pst", Aspose.Email.Outlook.Pst.BackupOptions.None);