bkrukowski/transparent-email
Composer 安装命令:
composer require bkrukowski/transparent-email
包简介
Remove aliases from email and get primary email account
README 文档
README
Transparent Email
Transparent Email clears aliases from email address. Email John.Doe+alias@gmail.com will be transformed to johndoe@gmail.com.
Why?
To detect multi-accounts on your website.
Supported mailboxes
- gmail.com and Google Apps with custom domain
- tlen.pl
- 33mail.com
- outlook.com
- yahoo.com
Usage
use bkrukowski\TransparentEmail\TransparentEmailFactory; use bkrukowski\TransparentEmail\Emails\Email; use bkrukowski\TransparentEmail\Emails\EmailInterface; use bkrukowski\TransparentEmail\Emails\InvalidEmailException; try { $factory = new TransparentEmailFactory(); $cleaner = $factory->createDefault(); $inputEmail = new Email('John.Doe+alias@gmail.com'); /** @var EmailInterface $transformedEmail */ $transformedEmail = $cleaner->getPrimaryEmail($inputEmail); echo $transformedEmail; } catch (InvalidEmailException $exception) { echo 'Invalid email!'; }
Versioning
The version numbers follow the Semantic Versioning 2.0.0 scheme.
Yahoo.com
Aliases work different on Yahoo than on Gmail. On Gmail part after plus is skipped.
For example message sent to janedoe+alias@gmail.com will be redirected to janedoe@gmail.com.
Yahoo uses the following pattern*:
baseName-keyword@yahoo.com
- baseName - value defined by the user, different than email login;
- keyword - one from a list of keywords defined by the user.
Therefore we do not know what is the real email, so in this case result will be baseName@yahoo.com,
which actually does not exist.
统计信息
- 总下载量: 5.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-10