-2

I've trying to check if the email address exists and is alive though the smtp server, but I'm getting answers as exact as possible.

Nick Udell
  • 2,420
  • 5
  • 44
  • 83
  • 1
    For what reason do you need to check the email address? If it is to register a user, you can try to generate a link and send it to them by e-mail (and require them to click it to finish registration). – Yet Another Geek Apr 21 '14 at 12:26
  • Does this answer your question? [How to check mail address is exists or not?](https://stackoverflow.com/questions/13514005/how-to-check-mail-address-is-exists-or-not) – tripleee Jan 24 '20 at 08:27

2 Answers2

0

Only way to prove that an email is alive is email confirmation after registering process. You should send to newly subscribed/registered user a link containing parmeters about his email confirmation.

for instance: new user with email aaa@bbb.ccc is registered and his email is saved into database with id "as23kja45". You should send him an email message with link yoursite.com/confirmation.php?id=as23kja45. After clicking on this link you'll read id in param value, check in database does it exists, if true => you have alive email address

Before sending such link you should check email by some email validator to prove that email satisfying form of email address.

dllhell
  • 1,987
  • 3
  • 34
  • 51
  • Hi dllhell, Thanks for the quick response. But this is not what i want. What i wanna do is to check email whether its valid or not. Its not single email need to get status for the bunch of email concurrently for example if paste ten email in the textarea and send it to the server and then split accordingly..... this is where i need to check those emails in bulk amount. Can you get my point? Again thanks – Sakthi Ganesh Apr 21 '14 at 12:27
  • @user3556534 I belive it is possible only to check if they are correct as email format and domain existance, but not if they are in use. – dllhell Apr 21 '14 at 12:29
  • 1
    Thanks http://www.ip-tracker.org/checker/email-lookup.php But i wonder how the above link processes and gives us the correct status of the email address. Anyway thanks for you help... – Sakthi Ganesh Apr 21 '14 at 12:41
  • @SakthiGanesh wow! I didnt know for this. Replay this to your own question as an answare as a solution. – dllhell Apr 21 '14 at 13:22
0

There is no 100% reliable way of checking the validity of an email address. There are a few things you can do to at least weed out obviously invalid addresses, though.

The problems that arise with email addresses is actually very similar to those of snail mail. All three points below can also be used for sending snail mail (just change the DNS record with a physical address).

1. Check that the address is formatted correctly

It is very difficult to check the format of email addresses, but PHP has a validation filter that attempts to do it. The filter does not handle comments and folding whitespace, but I doubt anyone will notice.

2. Check that the DNS record exists for the domain name

If a DNS (Domain Name System) record exists then at least someone has set it up. It does not mean that there is an email server at the address, but if the address exists then it is more likely.

3. Send a verification email to the address

This is the most effective way of seeing if someone is at the other end of the email address. If a confirmation email is not responded to in an orderly fashion -- 3 hours for example -- then there is probably some problem with the address.

Animesh
  • 1,005
  • 10
  • 20