.net code to read email into a sql database

被刻印的时光 ゝ 提交于 2019-12-12 20:16:24

问题


I am looking for some links and/or code snippets that will allow either an asp.net webpage, (or alternatively an outlook add-in) that will allow me to read emails sent to a particular email address, and then parse apart the email message into component parts (i.e. subject, body, attachments etc) and save to my database.

The basic subject line and content are most important, but I'd also like to be able to iterate thru attachments and any in-line images and then de-construct the pieces and save into an sql database so the message can be reconstructed.

What I am essentially looking to accomplish is have a way of forwarding certain "important" emails to non-human email address, have my app pick apart the pieces and then save to an SQL Server database, and then re-publish them to a website - for archiving purpose.

Any libraries or links that will make this painless as possible and keep me from re-inventing the wheel on this one?

Edit: The email I am using is a regular pop3 account, not exchange, if this makes a difference.


回答1:


Chilkat do a POP3 component that you might find useful: http://www.chilkatsoft.com/email-dotnet.asp

And Addin-Express do an excellent wrapper around Outlook if you don't feel brave enough for Visual Studio Tools for Microsoft Office http://www.add-in-express.com/




回答2:


I've also heard good things about mime4net



来源:https://stackoverflow.com/questions/701512/net-code-to-read-email-into-a-sql-database

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