I would like to know of the possible ways to block disposable email addresses from registering in my website.
For simplicity, let\'s take the example where the regi
This would be tough to hardcode as disposable/temporary email domains appear every day from services like 10minutemail, guerrillamail etc. That being said you're probably better off integrating some managed up to date servcie like antideo email health API for example.
Endpoint:
api.antideo.com/email/nzk41997@xzsok.com
JSON response
{
"email": "nzk41997@xzsok.com",
"free_provider": false,
"spam": false,
"scam": false,
"disposable": true
}
Your php code will then look something like:
$request = file_get_contents('http://api.antideo.com/email/nzk41997@xzsok.com');
$response = gzdecode($request);
$result = json_decode($response);
And then just look for the boolean like
if($result->disposable == true){
// EMAIL IS TEMPORARY/DISPOSABLE
} else {
// PERFORM YOUR ACTION
}
They also provide details about if the emails is known spammer/scammer or it's from a free provider like gmail, yahoo etc.
Disclaimer:
I know the guys from Antideo personally and I took a small part of building the service with them.