How to compare Emails?

Last post 07-08-2009 3:16 AM by qwe123kids. 5 replies.

Sort Posts:

  • How to compare Emails?

    07-07-2009, 3:10 AM
    • Member
      6 point Member
    • jayaramp
    • Member since 08-22-2008, 4:57 AM
    • Vizag
    • Posts 19

     Dear All,

            My requirement is to compare a submitted mail with an email template in C#. Any help must be appreciated.

     

     

    Thanks in advance.

  • Re: How to compare Emails?

    07-07-2009, 10:24 AM
    • Contributor
      5,138 point Contributor
    • papabear
    • Member since 08-08-2005, 3:49 PM
    • Posts 851

    If I understand your requirements what you are going to want to use are RegularExpressions (System.Text.RegularExpressions). There are a lot of examples on how to use RegularExpressions (there is even a RegularExpressionValidator for check controls like TextBoxes -> http://msdn.microsoft.com/en-us/library/aa720492%28VS.71%29.aspx which might give you a quick understanding.

    Per regular expressions themselves one of my favorite sites is http://www.regular-expressions.info/ because it gives a very nice tutorial. Also, per your req, if you click on "Examples" (on the left) you will see a choice for "Email Addresses" where he explains the good and the bad...

    ;)

    Hope that helps,

    m


    give me suggestions for what to blog... http://www.myfriedmind.com/techblog -> thx

    Mark as "Answered" if this solves that wee old problem...
  • Re: How to compare Emails?

    07-08-2009, 12:15 AM
    • Member
      6 point Member
    • jayaramp
    • Member since 08-22-2008, 4:57 AM
    • Vizag
    • Posts 19

     Hi,

       Actually, my requirement is checking the emails to find whether those mails are spam mails or not. The mail checking process will be done by comparing the mails with the email templates, if the mail matches the template its not a spam mail else its a spam mail.

  • Re: How to compare Emails?

    07-08-2009, 2:00 AM
    • Member
      20 point Member
    • Umars
    • Member since 07-07-2009, 4:08 AM
    • Posts 7

    Compare the submitted Email with following RE

    \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

  • Re: How to compare Emails?

    07-08-2009, 3:07 AM
    • Member
      6 point Member
    • jayaramp
    • Member since 08-22-2008, 4:57 AM
    • Vizag
    • Posts 19

    Hi, Checking of email address not only enough for testing whether it is a spam mail or not but also need to check the email subject, header,footer and body. Please help on this regard.

  • Re: How to compare Emails?

    07-08-2009, 3:16 AM
    Answer
    • All-Star
      27,613 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Mumbai
    • Posts 4,669

    hi,

    if checking for Spam filter u caheck for link mention below

    http://www.codeproject.com/KB/recipes/BayesianCS.aspx

    U can Check the alogrtim

    http://www.paulgraham.com/spam.html

    in above link

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
Page 1 of 1 (6 items)