Kickbox.io email verification for Magento 2
This module is a wrapper for the Kickbox.io php api library.
Based on linusshops/kickbox-magento for Magento 1.
Inject LinusShops\Kickbox\Model\EmailVerifier
for access to verification.
$email = 'test@example.com';
//'risky' emails are also considered deliverable
$this->emailVerifier->verifyIsDeliverable($email)
$verifiedEmail = $this->emailVerifier->verify('info@linusshops.com');
$isValid = $verifiedEmail->isDeliverable();
//Access any of the response fields from Kickbox as magic methods.
$result = $verifiedEmail->result();
$didYouMean = $verifiedEmail->did_you_mean();
$sendex = $verifiedEmail->sendex();
http://example.com/en/kickbox/deliverable?email=test@example.com
{
"error": 0,
"feedback": {
"message": "Data retrieved successfully!",
"debug": [],
"target": ""
},
"tpl": [],
"target": {
"feedback": "",
"payload": ""
},
"payload": {
"email": "samuel@dersam.net",
"deliverable": true
}
}
For best results, use Common.ajax for automagical parsing. https://github.com/linusshops/module-common
MIT