PHPackages                             cse/helpers-email - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. cse/helpers-email

ActiveLibrary[Framework](/categories/framework)

cse/helpers-email
=================

The helpers allows you manipulating, extract, detecting email.

1.0.2(7y ago)691.5k↓27%3[1 PRs](https://github.com/cs-eliseev/helpers-email/pulls)1MITPHPPHP &gt;=7.1

Since Mar 1Pushed 1y ago3 watchersCompare

[ Source](https://github.com/cs-eliseev/helpers-email)[ Packagist](https://packagist.org/packages/cse/helpers-email)[ Docs](https://github.com/cs-eliseev/helpers-email)[ RSS](/packages/cse-helpers-email/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

English | [Русский](https://github.com/cs-eliseev/helpers-email/blob/master/README.ru_RU.md)

EMAIL CSE HELPERS
=================

[](#email-cse-helpers)

[![Travis (.org)](https://camo.githubusercontent.com/eb105c62e0486bdd8e70579bd45f867a2802657c20dbb7b177e5a49074b40d02/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63732d656c69736565762f68656c706572732d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cs-eliseev/helpers-email)[![Codecov](https://camo.githubusercontent.com/24962c5f630d46809a4d887f25ddbe61ba27c1aaa5ec8123681a90dbc80e175d/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f63732d656c69736565762f68656c706572732d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/cs-eliseev/helpers-email)[![Scrutinizer code quality](https://camo.githubusercontent.com/8bd28fbf3bfa2724316dcabc4fd3c7dde817ff788318bf54d786a26582ca45be/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f63732d656c69736565762f68656c706572732d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cs-eliseev/helpers-email/?branch=master)

[![Packagist](https://camo.githubusercontent.com/5196c2ec73910d29a25d7fbc161331a6ee8c98904b25abf5bf6b133dde327855/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6373652f68656c706572732d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cse/helpers-email)[![Minimum PHP Version](https://camo.githubusercontent.com/dcd4b4aec2c1709157fa6a2c050f709d75cde9552a79cfff0b70a97fad7281ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cse/helpers-email)[![Packagist](https://camo.githubusercontent.com/b747fc64801806bfbb34490f7de6cd8e2b63f872c831ae2c9af5841066633c31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6373652f68656c706572732d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/cs-eliseev/helpers-email/blob/master/LICENSE.md)[![GitHub repo size](https://camo.githubusercontent.com/cfb37c6cb32fff5dd75bb5ef91439e047c3c525119a7054f0cf6d2a57272a360/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f63732d656c69736565762f68656c706572732d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/cs-eliseev/helpers-email/archive/master.zip)

The helpers allows you manipulating, extract, detecting EMAIL.

Project repository:

**DEMO**

```
switch (true) {
    case Email::is($emial):
        break;
    case Email::exist($emial):
        $emial = Email::extract($emial);
        break;
    default:
        new Exception('Email is not exist');
}

$emial = Email::hide($emial);
```

---

Introduction
------------

[](#introduction)

[CSE HELPERS](https://github.com/cs-eliseev/helpers/blob/master/README.md) is a collection of several libraries with simple functions written in PHP for people.

Despite using PHP as the main programming language for the Internet, its functions are not enough. EMAIL CSE HELPERS for manipulating, extract and detecting email.

[CSE HELPERS](https://github.com/cs-eliseev/helpers/blob/master/README.md) was created for the rapid development of web applications.

**CSE Helpers project:**

- [Array CSE helpers](https://github.com/cs-eliseev/helpers-arrays)
- [Cookie CSE helpers](https://github.com/cs-eliseev/helpers-cookie)
- [Date CSE helpers](https://github.com/cs-eliseev/helpers-date)
- [Email CSE helpers](https://github.com/cs-eliseev/helpers-email)
- [IP CSE helpers](https://github.com/cs-eliseev/helpers-ip)
- [Json CSE helpers](https://github.com/cs-eliseev/helpers-json)
- [Math Converter CSE helpers](https://github.com/cs-eliseev/helpers-math-converter)
- [Phone CSE helpers](https://github.com/cs-eliseev/helpers-phone)
- [Request CSE helpers](https://github.com/cs-eliseev/helpers-request)
- [Session CSE helpers](https://github.com/cs-eliseev/helpers-session)
- [Word CSE helpers](https://github.com/cs-eliseev/helpers-word)

Below you will find some information on how to init library and perform common commands.

Install
-------

[](#install)

You can find the most recent version of this project [here](https://github.com/cs-eliseev/helpers-email).

### Composer

[](#composer)

Execute the following command to get the latest version of the package:

```
composer require cse/helpers-email
```

Or file composer.json should include the following contents:

```
{
    "require": {
        "cse/helpers-email": "*"
    }
}
```

### Git

[](#git)

Clone this repository locally:

```
git clone https://github.com/cs-eliseev/helpers-email.git
```

### Download

[](#download)

[Download the latest release here](https://github.com/cs-eliseev/helpers-email/archive/master.zip).

Usage
-----

[](#usage)

The class consists of static methods that are conveniently used in any project. See example [examples-email.php](https://github.com/cs-eliseev/helpers-email/blob/master/examples/examples-email.php).

**HIDE email**

Example short email:

```
Email::hide('mail@google.com');
// m***@google.com
```

Example medium email:

```
Email::hide('email@google.com');
// m***l@google.com
```

Example large email:

```
Email::hide('email2018@google.com');
// e***l***8@google.com
```

**CHECK DOMAIN to email**

Example:

```
$domain = 'google.com';
Email::checkDomain('mail@google.com', $domain);
// true
Email::checkDomain('mail@mail.ru', $domain);
// false
```

**IS email**

Example:

```
Email::is('mail@google.com');
// true
```

Check email to string:

```
Email::is('Example text mail@google.com');
// false
```

**EXIST email**

Example:

```
Email::exist('mail@google.com');
// true
```

Check email to string:

```
Email::exist('Example text mail@google.com');
// true
```

Change pattern:

```
Email::exist('Example text mail@inbox.com', '([a-z]+@google.com)');
// false
```

**EXTRACT email from string**

Example:

```
Email::extract('Example text mail@google.com');
// mail@google.com
```

Change pattern:

```
Email::extract('Example text mail@inbox.com', '([a-z]+@google.com)');
// null
```

**EXTRACT ALL email from string**

Example:

```
Email::extract('Example text mail@google.com, mail@inbox.com');
/**
* [
*     0 => 'mail@google.com',
*     1 => 'mail@inbox.com'
* ]
*/
```

Change pattern:

```
Email::extract('Example text mail@google.com, mail@inbox.com', '([a-z]+@google.com)');
/**
* [
*     0 => 'mail@google.com'
* ]
*/
```

Testing &amp; Code Coverage
---------------------------

[](#testing--code-coverage)

PHPUnit is used for unit testing. Unit tests ensure that class and methods does exactly what it is meant to do.

General PHPUnit documentation can be found at .

To run the PHPUnit unit tests, execute:

```
phpunit PATH/TO/PROJECT/tests/
```

If you want code coverage reports, use the following:

```
phpunit --coverage-html ./report PATH/TO/PROJECT/tests/
```

Used PHPUnit default config:

```
phpunit --configuration PATH/TO/PROJECT/phpunit.xml
```

Donating
--------

[](#donating)

You can support this project [here](https://www.paypal.me/cseliseev/10usd). You can also help out by contributing to the project, or reporting bugs. Even voicing your suggestions for features is great. Anything to help is much appreciated.

License
-------

[](#license)

The EMAIL CSE HELPERS is open-source PHP library licensed under the MIT license. Please see [License File](https://github.com/cs-eliseev/helpers-email/blob/master/LICENSE.md) for more information.

---

> GitHub [@cs-eliseev](https://github.com/cs-eliseev)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Total

3

Last Release

2570d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3b9e49d0ce3fd71c8eb31b7c14e48373dbb415a9d16950ce52d23bf89b2ae26?d=identicon)[ak\_eliseev](/maintainers/ak_eliseev)

---

Top Contributors

[![cs-eliseev](https://avatars.githubusercontent.com/u/24221291?v=4)](https://github.com/cs-eliseev "cs-eliseev (57 commits)")

---

Tags

collectioncollectionscseemailemailsframeworkhelperhelperslibrarymailmailsphptooltoolsutilitiesutilityutilsframeworkhelperutilityhelpersmailemaillibrarytoolcollectioncollectionstoolsutilsutilitiesemailsmailscse

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cse-helpers-email/health.svg)

```
[![Health](https://phpackages.com/badges/cse-helpers-email/health.svg)](https://phpackages.com/packages/cse-helpers-email)
```

###  Alternatives

[cse/helpers-session

The helpers allows you to easily manage session data. START, SET, GET DELETE, HAS method session - all this is available in this library.

102.6k3](/packages/cse-helpers-session)[jbzoo/utils

Collection of PHP functions, mini classes and snippets for everyday developer's routine life.

8321.5M36](/packages/jbzoo-utils)[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
