Question

Possible Duplicate:
check if email are valid and exists
How to validate an email address in PHP

I am developing a application for sending mail by provided mail address in PHP. now i wanna validate given mail address is really exist in domain or not

  **i.e
    abc@xyz.com (for example its registred in xyz domain)
    abcd@xyz.com (for example its nod registred xyz domain)**

how can i verify it by using PHP.

Thanks in advance

Was it helpful?

Solution

  1. Generate a token
  2. Store that token against the email address in a database
  3. Send an email to that address with a URL that includes the token and a hash of the email address

If someone visits that URL, then the address exists.

SMTP provides a mechanism to ask if a server hosts a particular address, but it is almost always disabled as it is a favourite tool of spammers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top