Skip to content
/ email Public

PHP library to help processing email related tasks, such as a Email Address Parser and etc.

License

Notifications You must be signed in to change notification settings

yoozi/email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

email

This library is part of Project Golem, see yoozi/golem for more info.

PHP libraries to help processing email related tasks, such as a Email Address Parser and etc.

Installation

The best and easy way to install the Golem package is with Composer.

  1. Open your composer.json and add the following to the require array:

    "yoozi/email": "1.0.*"
    
  2. Run Composer to install or update the new package dependencies.

    php composer install
    

    or

    php composer update
    

Usage

Email Address Parser

We can use this Parser class to parse an email address.

<?php

use Yoozi\Email\Address\Parser;

$email = '[email protected]';
$parts = $this->parser->parse($email);

var_dump($meta);

Data returned:

array(5) {
  ["email"]=>
  string(18) "[email protected]"
  ["local"]=>
  string(8) "user"
  ["domain"]=>
  string(9) "gmail.com"
  ["url"]=>
  string(22) "http://mail.google.com"
  ["listed"]=>
  bool(true)
}
  • email: The email address we are currently parsing.
  • local: Local part of this address.
  • domain: Domain name of this address.
  • url: Url for users to log into the email service.
  • listed: Whether this address is listed in the thrid-party email service provider whitelist.

About

PHP library to help processing email related tasks, such as a Email Address Parser and etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages