EWS Managed API - How to copy items from one mailb

2019-07-01 21:22发布

I am writing an application(C#) to sync contacts,appointments,tasks etc from one mailbox to other. I am able to retrieve changes to these items using SyncFolderItems but could not find a way to copy the changes to a different mailbox. It looks like I have to create a new item for each of these types on the destination mailbox. If that is the case how do I get all the properties on the source item onto the new item on the destination. I am currently using exchange 2007 sp1 environment and want to use the same code for exchange 2010 also.

1条回答
爷的心禁止访问
2楼-- · 2019-07-01 21:35

(This is what worked for me on Exchange 2010. The docs don't mention 2007 so you may be out of luck there.)

Use SyncFolderItems to find the items you want to move. Next, use ExportItems to export them to a file, and then UploadItems to put them into the other mailbox. ExportItems and UploadItems operations with Exchange Online is very detailed and has examples of the import/export operation (including an example where the source and destination are different mailboxes).

查看更多
登录 后发表回答