PHP code example of mitmelon / email_horse
1. Go to this page and download the library: Download mitmelon/email_horse library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mitmelon / email_horse example snippets
composer
// Initialize library class
$mail = new Email_Horse();
// Set the timeout value on stream
$mail->setStreamTimeoutWait(20);
// Set debug output mode
$mail->Debug= TRUE;
$mail->Debugoutput= 'html';
// Set email address for SMTP request
$mail->setEmailFrom('[email protected]');
// Email to check/validate
$email = '[email protected]';
// Check if email is valid and exist
if($mail->check($email)){
echo 'Email <'.$email.'> is exist!';
}elseif($mail::validate($email)){
echo 'Email <'.$email.'> is valid, but not exist!';
}else{
echo 'Email <'.$email.'> is not valid and not exist!';
}