Page 1 of 1

Email Verification

Posted: Fri Nov 04, 2011 8:17 pm
by jhame26
Hi Guys, Sir and Madam! i just want to consult this convern, is there any way how I can validate the email if it is a spam or not? before they go to my database? is there any recommendations :)

Re: Email Verification

Posted: Fri Nov 04, 2011 11:03 pm
by twinedev
When you say "is it spam or not", are you talking about mail coming being spam, or referring to just a made up e-mail someone is using to sign up to spam your site (ie, a forum)?

If you are talking the later:

The most basic is using a regex to make sure it is a correct format (search for e-mail regex)

Second, you can then do a call to make sure that the domain exists with something like checkdnsrr() (see http://us3.php.net/manual/en/function.checkdnsrr.php, in the comments about the 8th one down is sample email check code, not sure how good that one is)

Then you can use some type of service to see if the domain is listed on a blacklist (Never actually had to implement this, so not sure exactly what you would need to do).

One thing to do, visit sites that offer temp e-mails for signups, like http://www.guerrillamail.com/ , every month or so and add the domain they are using into your blacklist (currently it is sharklasers.com).

-Greg