Hi David,
It would be possible to do a DNS record check to make sure that the email domain exists, but the only way to verify that the whole email address is real would be to integrate this extension with a premium email validation service. That would be possible, but it would mean that users of this extension would need to sign up for that service in order to have the verification functionality.
I’ll add the DNS record check at some point, but it’s unlikely that I’ll force an integration with a premium service.
Thanks for the suggestion!
Hi Hugh,
The DNS check would be a good start… I don’t think running an SMTP session should require too much complexity though – e.g. here’s a PHP class:
https://code.google.com/p/php-smtp-email-validation/
It’s as easy as this:
$SMTP_Validator = new SMTP_validateEmail();
$results = $SMTP_Validator->validate(array('[email protected]'), '[email protected]');
echo $email.' is '.($results[$email] ? 'valid' : 'invalid')."\n";
David
P.S. The documentation for that class says that it handles the MX record lookup too. So you’d get that for free!
P.P.S. And, thank you for replying!
David
Thanks for that – I didn’t come across that class before. I’ll look into the integration and see how well it works out. I’ll update this extension if it seems like a worthwhile update.
Thanks!
The SMTP Validator is a good idea in theory (I would love this ability), but in reality it doesn’t work well, it does not handle all responses from MTA’s correctly and you also run the risk of your ip that is doing the checking getting seen by Google for example as an email address harvestor because this validator is doing essentially what a harvestor does.
If you look at the issues list with that smtp validator you will see what i’m talking about, with peoples experience with it:
https://code.google.com/p/php-smtp-email-validation/issues/list
Thanks for that – I have already been looking into this and I’ve encountered the same problems that you have highlighted. On top of that, even if the STMP validation does work correctly, it is still incredibly slow and it makes the checkout process take ages – this is not something that I want to do with this extension (or any other extension). I’m going to look around for a different solution, but I can’t guarantee that I’ll find one – especially one that works nice and fast.
The only thing I can think of worth doing and I’m not sure how do-able it is, is to look for typos in the domain portion of the email address, like if they type ‘gmail.co’ or ‘yaoo.com’.
I could probably come up with a list of the top misspellings of common domains if thats helpful.
Hi,
How about implementing it in this way:
1) Verify in-page via AJAX, rather than blocking the order
2) Make the results advisory, rather than binding. i.e. We are saying to the user ‘that email address looks possibly invalid – please double-check it’
David
I think the best option is this:
- Add a domain lookup to make sure the email address’ domain exists
- Add an integration with a premium email verification service and allow users to opt-in to that if they want
I’ll add the domain lookup in the next release (should be sometime in the next week or two), but the integration will be longer as I’ll need to find the most reliable and cost-effective service that offers a workable API – if you have any suggestions feel free to post them here.
David: Thanks for your suggestion, but as for the Ajax method – that wouldn’t really help because the whole point of the validation is to block the order if the address does not exist. Also, there is no clean way to offer an advisory error message like you suggest without blocking the order from being processed. If I can come up with something clean and functional in that regard then I’ll see what I can do though.
I would worry about false negatives on this. You may want to maintain a white-list of common domains, such as gmail and yahoo, in case a connectivity error or change in protocol gives a false negative.
Thanks for the input, but I’ve decided to can this feature. After doing some testing I’ve found two major problems:
- It is unreliable (as you pointed out)
- It makes the checkout submission process incredibly slow
If people want a feature like this then they’re going to have to look elsewhere as it is not in the goals for this plugin.