yswprog / mail-validation
E-Mail validation to check email is active or not
1.1.1
2022-08-20 04:01 UTC
Requires
- php: ^7.2|^7.3|^2.4|8.*
- vlucas/phpdotenv: ^4.0|5.4.x-dev
This package is auto-updated.
Last update: 2025-06-20 10:08:03 UTC
README
Install with composer
To install with Composer, simply require the latest version of this package.
composer require yswprog/mail-validation
Method of use
- PHP native.
<?php include('vendor/autoload.php'); use YProg\MailValidation\EmailVerify; // Load .env file if with custom env $dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv->safeLoad(); // Check email is valid or not $verify = EmailVerify::setEmail('yswprog@gmail.com'); $verify->check(); // Show message echo $verify->getMessage();
- Laravel
use App\Http\Controllers\Controller; use YProg\MailValidation\EmailVerify; class CustomController extends Controller { public function testing() { // Check email is valid or not $verify = EmailVerify::setEmail('yswprog@gmail.com'); $verify->check(); // Show message return $verify->getMessage(); } }