Reputation: 48
Does someone here know how to validate the exist email in Laravel? Not only valid email by it's domain, etc, but I need really exist email in this world. Thank you in advance.
Upvotes: 1
Views: 894
Reputation: 419
Go to emailable.com and create an account to get the API key
send a GET
request to https://api.emailable.com/v1/[email protected]&api_key=live_xxxxx
You should get a response like below
{
"accept_all": false,
"did_you_mean": null,
"disposable": false,
"domain": "gmail.com",
"duration": 0.036,
"email": "[email protected]",
"first_name": null,
"free": true,
"full_name": null,
"gender": null,
"last_name": null,
"mx_record": "gmail-smtp-in.l.google.com",
"reason": "accepted_email",
"role": false,
"score": 95,
"smtp_provider": "Google",
"state": "deliverable",
"tag": null,
"user": "email user"
}
When the state
is deliverable
then the email is valid and undeliverable
means the email is invalid and cannot receive an email.
Upvotes: 0
Reputation: 76
You can use an API For that like Trumail
make this request:
https://api.trumail.io/v2/lookups/<format>?email=<email>
It will return some information about the email provided, one of this information is deliverable
which takes the value true
if it's a real email.
Upvotes: 5