transparent-email/README.md

41 lines
1.7 KiB
Markdown
Raw Normal View History

2016-09-10 16:29:03 +03:00
[![Build Status](https://travis-ci.org/bkrukowski/transparent-email.svg?branch=master)](https://travis-ci.org/bkrukowski/transparent-email)
[![Coverage Status](https://coveralls.io/repos/github/bkrukowski/transparent-email/badge.svg?branch=master)](https://coveralls.io/github/bkrukowski/transparent-email?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7f5196c71a7349a4b04228bbafb72c13)](https://www.codacy.com/app/bartlomiej-krukowski/transparent-email?utm_source=github.com&utm_medium=referral&utm_content=bkrukowski/transparent-email&utm_campaign=Badge_Grade)
2016-09-10 03:10:17 +03:00
2016-09-10 16:13:55 +03:00
# Transparent Email
2016-09-10 03:10:17 +03:00
2016-09-10 16:13:55 +03:00
Transparent Email clears aliases from email address. Email `John.Doe+alias@gmail.com` will be transformed to `johndoe@gmail.com`.
2016-09-10 03:10:17 +03:00
2016-09-10 15:10:52 +03:00
## Why?
2016-09-10 15:11:19 +03:00
To detect multi-accounts on your website.
2016-09-10 15:10:52 +03:00
2016-09-10 03:10:17 +03:00
## Supported mailboxes
2016-09-10 03:14:15 +03:00
* [gmail.com](https://gmail.com)
2016-09-10 03:10:17 +03:00
* [tlen.pl](http://tlen.pl)
* [33mail.com](https://www.33mail.com)
2016-09-10 13:15:37 +03:00
* [outlook.com](http://outlook.com)
2016-09-10 14:33:57 +03:00
* [yahoo.com](http://mail.yahoo.com)
2016-09-10 03:10:17 +03:00
## Usage
```php
2016-09-10 16:13:55 +03:00
$cleaner = new \bkrukowski\TransparentEmail\TransparentEmail();
$transformedEmail = $cleaner->getPrimaryEmail('John.Doe+alias@gmail.com');
2016-09-10 15:10:52 +03:00
```
## Yahoo.com
Aliases work different on Yahoo than on Gmail. On Gmail part after plus is skipped.
2016-09-13 19:20:51 +03:00
For example message sent to `janedoe+alias@gmail.com` will be redirected to `janedoe@gmail.com`.
2016-09-10 15:10:52 +03:00
Yahoo uses the following pattern[*](https://help.yahoo.com/kb/SLN16026.html):
*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.
2016-09-10 15:45:30 +03:00
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.