Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoozi/email
PHP library to help processing email related tasks, such as a Email Address Parser and etc.
https://github.com/yoozi/email
Last synced: 26 days ago
JSON representation
PHP library to help processing email related tasks, such as a Email Address Parser and etc.
- Host: GitHub
- URL: https://github.com/yoozi/email
- Owner: yoozi
- License: mit
- Created: 2014-04-02T10:52:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-06T10:45:19.000Z (almost 10 years ago)
- Last Synced: 2024-10-01T04:56:58.708Z (about 1 month ago)
- Language: PHP
- Homepage: http://golem.yoozi.cn/
- Size: 254 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
=====> This library is part of [Project Golem](http://golem.yoozi.cn/), see [yoozi/golem](https://github.com/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](https://getcomposer.org).
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
parser->parse($email);var_dump($meta);
```Data returned:
```php
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](https://github.com/yoozi/golem/blob/master/lib/Yoozi/Email/Address/Parser.php#L28).