transparent-email/README.md

41 lines
1.6 KiB
Markdown
Raw Normal View History

2016-09-10 02:51:50 +03:00
[![Build Status](https://travis-ci.org/bkrukowski/gordianus.svg?branch=master)](https://travis-ci.org/bkrukowski/gordianus)
[![Coverage Status](https://coveralls.io/repos/github/bkrukowski/gordianus/badge.svg?branch=master)](https://coveralls.io/github/bkrukowski/gordianus?branch=master)
2016-09-10 03:10:17 +03:00
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b057fa037a3b4f318f75af27b0b01d47)](https://www.codacy.com/app/bartlomiej-krukowski/gordianus?utm_source=github.com&utm_medium=referral&utm_content=bkrukowski/gordianus&utm_campaign=Badge_Grade)
# Gordianus
2016-09-10 04:10:47 +03:00
Gordianus 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
$gordianus = new \bkrukowski\Gordianus\Gordianus();
$transformedEmail = $gordianus->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.
For example message sent to `jane.doe+alias@gmail.com` will be redirected to `jane.doe@gmail.com`.
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.