Skip to content

kehers/MG_Email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MG_Email

Quick class to validate email using mailgun's API (http://documentation.mailgun.com/api-email-validation.html).

<?php
include_once 'MG_Email.php';
$mailgun_public_api_key = 'your_mailgun_public_key';
$mg_email = new MG_Email($mailgun_public_api_key);
$email = '[email protected]';
if ($mg_email->is_valid($email)) {
    echo $email.' is valid';
}
else {
    echo $email.' is invalid.';
    if ($mg_email->spell_check)
        echo ' Do you mean '.$mg_email->spell_check.'?';
}
?>

About

Quick class to validate email using mailgun's API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages