Home php Check e-mail for existence

Check e-mail for existence

Author

Date

Category

How can you define e-mail for existence in php?


Answer 1, authority 100%

can be done in THEORY, but not everywhere.

about Google:

telnet gmail-smtp-in.l.google.com 25
helo example.com
mail from: & lt; [email protected]>
rcpt to: & lt; [email protected]>
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596

and if the user exists, the answer will be:

250 2.1.5 OK

here’s more full timed response

All of this may well work for other servers as well.


Answer 2, authority 92%

Not sure if this is programmed in PCP.

Probably the most realistic way is to try to connect to the server (having learned its address by MX in DNS) via SMTP and “start sending mail”, send as a result

RCPT TO: @ address to check

Answer 3

  1. see comment.
  2. I found it!
  3. habrahabr describes what, where and how.
  4. In the same habra topic there is comment .
  5. You can come up with some method yourself)

  6. Answer 4

    this cannot be done in principle


    Answer 5

    function isEmail ($ email) {
      return preg_match ("/ ^ ([a-z0-9 _-] + \.) * [a-z0-9 _-] + @ [a-z0-9 _-] + (\. [a-z0-9_-] +) * \. [az] {2,6} $ / i ", $ email);
    }
    

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions