2017 © Pedro PelĂĄez
 

library email-concealer

Conceal e-mail addresses in a string by replacing their domain

image

spatie/email-concealer

Conceal e-mail addresses in a string by replacing their domain

  • Friday, May 4, 2018
  • by Spatie
  • Repository
  • 5 Watchers
  • 27 Stars
  • 79 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 163 % Grown

The README.md

, (*1)

Conceal e-mail addresses in a string

Latest Version on Packagist Build Status StyleCI Quality Score Total Downloads, (*2)

Conceal e-mail addresses in a string by replacing their domain. Useful for concealing up production data—like MySQL dumps—so you can use it locally without worrying about having real addresses on your system., (*3)

use Spatie\EmailConcealer\Concealer;

$concealer = Concealer::create();

$concealer->conceal('info@spatie.be');
// "info@example.com"

Support us

, (*4)

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products., (*5)

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall., (*6)

Postcardware

You're free to use this package (it's MIT-licensed), but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using., (*7)

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium., (*8)

We publish all received postcards on our company website., (*9)

Installation

You can install the package via composer:, (*10)

``` bash composer require spatie/email-concealer, (*11)


## Usage To conceal a string, create an `Concealer` instance. and call the `conceal` method. ```php use Spatie\EmailConcealer\Concealer; $concealer = Concealer::create(); $concealer->conceal('info@spatie.be'); // "info@example.com"

The concealer processes every e-mail address it finds in the string. It will ensure that there aren't any unwanted duplicates if the local-part is the same., (*12)

$concealer->conceal('info@spatie.be,info@foo.com,info@bar.com');
// "info@example.com,info-1@foo.com,info-2@bar.com"

Equal e-mail addresses will always conceal to the same concealed address., (*13)

$concealer->conceal('info@spatie.be,info@foo.com,info@spatie.be');
// "info@example.com,info-1@example.com,info@example.com"

If you want to use a different domain than example.com, use the domain method to set a new one., (*14)

$concealer = Concealer::create()->domain('foo.com');

echo $concealer->conceal('info@spatie.be'); // "info@foo.com"

Changelog

Please see CHANGELOG for more information what has changed recently., (*15)

Testing

bash $ composer test, (*16)

Contributing

Please see CONTRIBUTING for details., (*17)

Security

If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker., (*18)

Credits

About Spatie

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website., (*19)

License

The MIT License (MIT). Please see License File for more information., (*20)

The Versions

04/05 2018

dev-master

9999999-dev https://github.com/spatie/email-concealer

Conceal e-mail addresses in a string by replacing their domain

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

data emails spatie obfuscate email-concealer conceal

26/04 2017

1.0.1

1.0.1.0 https://github.com/spatie/email-concealer

Conceal e-mail addresses in a string by replacing their domain

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

data emails spatie obfuscate email-concealer conceal

21/04 2017

1.0.0

1.0.0.0 https://github.com/spatie/email-concealer

Conceal e-mail addresses in a string by replacing their domain

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

data emails spatie obfuscate email-concealer conceal