开发者

How to filter emails using content and subject?

开发者 https://www.devze.com 2023-01-24 07:03 出处:网络
In my application(C#) i need to filter emails based on their content. If an email is a double-op开发者_如何学Ct in need to send it to a specified email address if it\'s a normal email i should send it

In my application(C#) i need to filter emails based on their content. If an email is a double-op开发者_如何学Ct 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.


I think you should use MailSystem.NET, which will make email parsing very easy.

MailSystem is a suite of .NET components that provide users with an extensive set of email tools. MailSystem provides full support for SMTP, POP3, IMAP4, NNTP, MIME, S/MIME, OpenPGP, DNS, vCard, vCalendar, Anti-Spam (Bayesian , RBL, DomainKeys), Queueing, Mail Merge and WhoIs

You have to provide configuration details, like mail server name, username and password. Then read each mail and it's subject.


It depends on the mail client you are using. Gmail provides such capabilities as many other modern mail clients.

0

精彩评论

暂无评论...
验证码 换一张
取 消