如何使用内容和主题过滤电子邮件?
在我的应用程序(C#)中,我需要根据内容过滤电子邮件。如果电子邮件是双重选择,需要将其发送到指定的电子邮件地址,如果是普通电子邮件,我应该将其发送到另一个电子邮件地址。
我查看了收到的电子邮件,并列出了双重选择加入电子邮件主题中出现的常用单词列表(最多 10 - 20 个单词)。对于收到的每封电子邮件,我都会检查主题是否包含某些单词,以及它们是否超过 2-3 个,具体取决于主题长度,我决定这是一个选择加入。问题是这个基本版本效果不佳。
我读到了有关垃圾邮件过滤器的内容(基本上我想做的事情是类似的。),在网上搜索了一些示例后,我发现了一些基于贝叶斯网络的示例。这个解决方案的问题是我需要提供大量我还没有的培训材料。
我如何根据内容+主题或仅主题过滤这些电子邮件,而不需要大量培训材料?
编辑:我想在电子邮件服务器级别进行过滤。
In my application(C#) i need to filter emails based on their content. If an email is a double-opt in need to send it to a specified email address if it's a normal email i should send it to another email address.
I looked at the emails that come in and made a list of common words that appear in the subject for the double opt-in emails(10 - 20 words max). For each email that came in i checked if the subject contained some of the words and if they where more than 2-3 depending on the subject length i decided that was an opt-in. Problem was that this basic version didn't worked well.
I read about spam filters(basically what i want to do is similar.) and after searching for some examples on the web i found some based on Bayesian Networks. The problem with this solution is that i needed to feed in a lot of training material which i don't have yet.
How could i filter these emails based on content+subject or just subject without needing a lot of training material?
EDIT: i want to do the filtering at the email server level.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你应该使用 MailSystem.NET,这将使电子邮件解析变得非常容易。
您必须提供配置详细信息,例如邮件服务器名称、用户名和密码。
然后阅读每封邮件及其主题。
I think you should use MailSystem.NET, which will make email parsing very easy.
You have to provide configuration details, like mail server name, username and password.
Then read each mail and it's subject.
这取决于您使用的邮件客户端。
Gmail 提供了与许多其他现代邮件客户端一样的功能。
It depends on the mail client you are using.
Gmail provides such capabilities as many other modern mail clients.