使用 Microsoft SMTP 服务器的 Dropfolder
我已经设置了 Microsoft SMTP 服务器,因此它将所有传入电子邮件存储在 dropfolder 中。
我想使用 C# 根据发件人、收件人和主题行处理传入邮件。如果可能的话,我还想创建电子邮件的纯文本预览。
所以,这个问题有两个部分。
- 我猜是 FileSystemWatcher 将足以提供 收到邮件的通知。
- 如何从 .eml 文件中解析标题和正文;是否有现有的库或有关该格式的任何好的文档?
感谢您的任何帮助。
I have set up Microsoft SMTP server so it will store all incoming email in a dropfolder.
I want to process, using c#, incoming mail based on the sender, recipient, and subject line. If possible, I also want to create a plain text preview of the email.
So, there are two parts to this problem.
- I'm guessing a FileSystemWatcher
would be adequate for providing
notification of incoming mail. - How to parse the headers and body text from the .eml file; is there an existing library or any good documentation on the format?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个用 C# 编写的邮件服务器,带有一个 API,您可以在不使用邮件服务器的情况下使用它
编辑:找到一个代码片段:
It's a Mailserver written in C# with an API you can use without using the Mailserver
EDIT: Found a code snippet: