Verify whether an email address is real and deliverable — in real time, from PHP, using the MailTester Ninja API. One HTTP call. Nothing is stored on our side.
<?php
$q = http_build_query([
"email" => "someone@example.com",
"key" => "YOUR_API_KEY",
]);
$data = json_decode(file_get_contents("https://happy.mailtester.ninja/ninja?$q"), true);
echo $data["code"] . " " . $data["message"]; // ok Acceptedok | Accepted | the mailbox exists and accepts mail |
ko | Rejected | invalid / undeliverable address |
mb | Catch-All / uncertain | domain accepts everything, or temporary state |
Get a free API key at mailtester.ninja/api. Prefer a quick manual check? Use the free domain analyzer.