简体   繁体   中英

C# import/export data to Mailclient

I am currently working on a program to export/import data from other mail clients to outlook. So far it seems I have two options available.

  1. I learn how to write to a pst file so I can easily import the necessary data.
  2. I create a different, self-made connection.

I am not asking which one I should use but rather on some advice because so far while planning I ran across a few things with each method that might turn out to be too much of problem.

  1. So far I couldn't find an existing library that allows writing to a .pst file. I am lucky to finally have found a library that allows reading the pst file that is open source.

  2. I haven't found a way yet to programmatically create a new mail item in the inbox. I have been able to create a new email that can be sent but no email yet that is "incoming".

have you looked into outlook interop? depending on how your application will function it is a great way to interact with outlook at a high level, you can easily create mailItems, calendar, memos etc.

My recommendation would be to create a temporary IMAP account on whatever IMAP server you like best (whether that be GMail, Yahoo!Mail, some other free IMAP account, or a local Exchange/Dovecot/etc server).

Then, once you've got that setup, export mail from Mail Client X to the IMAP server and then add the temporary IMAP account to Outlook and copy them all into your Outlook folders.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM