EWS Managed API - How to copy items from one mailbox to other

只愿长相守 提交于 2020-01-14 14:39:31

问题


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:


(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).



来源:https://stackoverflow.com/questions/13727009/ews-managed-api-how-to-copy-items-from-one-mailbox-to-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!