Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void verify()
- {
- Chilkat.MailMan mailman = new Chilkat.MailMan();
- mailman.UnlockComponent("ZIP!TEAM!BEAN_009307E59RoC");
- mailman.MailHost = "pop.gmail.com";
- mailman.PopUsername = "kinganu123@gmail.com";
- mailman.PopPassword = "blehblah";
- mailman.PopSsl = true;
- mailman.MailPort = 995;
- Chilkat.EmailBundle bundle = default(Chilkat.EmailBundle);
- MessageBox.Show("Hit 1");
- bundle = mailman.CopyMail();
- if (bundle == null == false)
- {
- int i = 0;
- int n = bundle.MessageCount;
- MessageBox.Show("Hit 2");
- for (i = 0; i <= n - 1; i++)
- {
- Chilkat.Email email = bundle.GetEmail(i);
- string body = "Grockit offers your child 3 engaging ways to learn:";
- body = email.Body;
- System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("<a href=\\\"([^\\\"]*)\\\">(.*?)<\\/a>", System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.Singleline);
- System.Text.RegularExpressions.MatchCollection col = regex.Matches(body);
- foreach (System.Text.RegularExpressions.Match match in col)
- {
- string link = match.Groups[1].Value;
- if (link.Contains("grockit.com"))
- {
- MessageBox.Show(link);
- }
- else
- {
- MessageBox.Show("error");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement