PHP code example of omegavesko / email-parser

1. Go to this page and download the library: Download omegavesko/email-parser 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/ */

    

omegavesko / email-parser example snippets




use OmegaVesko\EmailParser\EmailParser;

$parser = new EmailParser();

$emailInformation = $parser->parseEmail("[email protected]");

$emailInformation->email; // '[email protected]'
$emailInformation->domain; //  'test.dev'
$emailInformation->localPart; // 'example'
$emailInformation->emailService; // EmailServiceInformation instance (or null)



use OmegaVesko\EmailParser\EmailParser;

$parser = new EmailParser();

$emailInformation = $parser->parseEmail("[email protected]");

$emailInformation->emailService->name; // 'Gmail'
$emailInformation->emailService->domains; // ['gmail.com', 'googlemail.com']
$emailInformation->emailService->webmailUrl; // 'https://mail.google.com/'