Laravel Sift
============

 *v0.4.0* 

Tell a business email from a Gmail address.

 ```
composer require mischasigtermans/laravel-sift
```

 [Install Laravel Sift](https://github.com/mischasigtermans/laravel-sift) [View on GitHub](https://github.com/mischasigtermans/laravel-sift) 

An email address tells you who someone works for, unless it ends in gmail.com. Sift draws that line. It pulls the domain out of an address, drops it when it belongs to a public provider, and hands you what's left: the company.

That matters in a few dull, important places. A lead form that should only take work addresses. Grouping users by company. Matching sign-ups to accounts in a CRM. Knowing how many of your users signed up with a business email at all. [Stagent](https://stagent.com) uses it in production.

It's a list, not a lookup. Sift doesn't check that a domain exists, that it receives mail, or that the company is real. A domain counts as business when it isn't on the list, so a provider that's missing passes as a business until you add it with `additional_domains`.

What it does
------------

- A domain, or nullSift::domain('user@company.com') returns company.com. A Gmail, Yahoo or Outlook address returns null, unless you ask for public domains too.
- A business-email ruleSift::rule(), or new BusinessEmail, in a form request rejects personal addresses with 'The email must be a business email address.'
- Batches and statsSift::domains() returns the unique business domains in a list of emails. Sift::stats() gives the total, the business and personal split, the business rate and the top domains.
- A provider list kept current for youThe list of public-provider domains lives in the package, so an update brings new ones. Add your own with additional\_domains, or let one through with exclude\_default\_domains.

[Install Laravel Sift](https://github.com/mischasigtermans/laravel-sift).
