PHP code example of jojostx / laravel-elasticemail

1. Go to this page and download the library: Download jojostx/laravel-elasticemail 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/ */

    

jojostx / laravel-elasticemail example snippets


use Jojostx\ElasticEmail\Classes\ElasticEmail;

$ElasticEmail = new ElasticEmail('api-key-here');
$validationResult = $ElasticEmail->check('[email protected]');

use Jojostx\ElasticEmail\Classes\ElasticEmail;

$ElasticEmail = new ElasticEmail('api-key-here');
$validationResults = $ElasticEmail->checkMany(['[email protected]', '[email protected]']);
     
use ElasticEmail;
    
return ElasticEmail::check('[email protected]');

use Jojostx\ElasticEmail\Classes\ElasticEmail;

$ElasticEmail = new ElasticEmail('api-key-here');

// Result fetched from the API.
$validationResults = $ElasticEmail->shouldCache()->check('[email protected]');

// Result fetched from the cache.
$validationResults = $ElasticEmail->shouldCache()->check('[email protected]');

use Jojostx\ElasticEmail\Classes\ElasticEmail;

$ElasticEmail = new ElasticEmail('api-key-here');

$validationResults = $ElasticEmail->fresh()->check('[email protected]');
bash
php artisan vendor:publish --provider="Jojostx\ElasticEmail\Providers\ElasticEmailProvider"