0

I want to check whether email id exists or not for any email Id.

So I want to get the hostname/smtp name for the given email and then check whether it exists or not.

I was successfully able to check the same for google but I want it do be dynamic checking for bulk emails

Arijit Mukherjee
  • 3,817
  • 2
  • 31
  • 51
  • Possible duplicate of [How to check if an email address exists without sending an email?](http://stackoverflow.com/questions/565504/how-to-check-if-an-email-address-exists-without-sending-an-email) – Richard Ev Oct 18 '16 at 06:35

2 Answers2

0

You can use IMO, RCPT method for that, here is a good article about that. There are lot of details in the article just pic the portion you need

Mostafiz
  • 7,243
  • 3
  • 28
  • 42
0

Make changes according to your requirement.you can use your collection or table inpalce of domainlist

public static bool IsInDomain(string newEmail)
    {
        var mailAddress = new MailAddress(newEmail);
        var newDomain = mailAddress.Host;
        return DomainList != null && DomainList.Any(domain => domain.ToLower().Equals(newDomain.ToLower()));
    }
Vaibhav Bhatia
  • 528
  • 1
  • 4
  • 12