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
- see comment.
- I found it!
- habrahabr describes what, where and how.
- In the same habra topic there is comment .
- You can come up with some method yourself)
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);
}