7

I am using c# to write an Outlook 2007 add-in to store emails in a SQL Server 2005 database. I would like to be able to store the entire .msg file in a varbinary(MAX) field. Is there a way to do this without having to use the Outlook MailItem's SaveAs() method to save to a temp file and then read the file back in? I will need to transfer a large number of emails to the database and would prefer to avoid costly disk reads and writes.

4

2 回答 2

2

如果您希望将其实际存储为 .msg 格式文件,而不是尝试自己重新编写,我会说您正在寻找您提到的路线。

就我个人而言,我会去存储电子邮件的点点滴滴,但这取决于你要如何处理它。在我看来,将 MSG 文件存储在数据库中并没有任何价值。现在您的用例可能证明并非如此。

于 2010-01-28T21:43:41.993 回答
1

可能。

根据您的设置,您可以避免使用 Outlook,而只使用 Exchange/SQL Server。

链接服务器到 Exchange。

我从来没有试过所以YMMV

于 2010-01-28T21:49:32.190 回答