{"id":19325003,"url":"https://github.com/spatie/email-concealer","last_synced_at":"2025-09-02T22:40:41.706Z","repository":{"id":20131509,"uuid":"88886061","full_name":"spatie/email-concealer","owner":"spatie","description":"Conceal e-mail addresses in a string by replacing their domain","archived":false,"fork":false,"pushed_at":"2022-03-21T13:00:07.000Z","size":120,"stargazers_count":53,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-22T20:47:00.121Z","etag":null,"topics":["developer-tools","email","obfuscation","security"],"latest_commit_sha":null,"homepage":"https://spatie.be/opensource/php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"spatie","custom":"https://spatie.be/open-source/support-us"}},"created_at":"2017-04-20T16:15:15.000Z","updated_at":"2024-04-09T20:39:22.000Z","dependencies_parsed_at":"2022-07-23T14:46:24.623Z","dependency_job_id":null,"html_url":"https://github.com/spatie/email-concealer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/spatie/email-concealer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Femail-concealer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Femail-concealer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Femail-concealer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Femail-concealer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/email-concealer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Femail-concealer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260901036,"owners_count":23079697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","email","obfuscation","security"],"created_at":"2024-11-10T02:08:33.891Z","updated_at":"2025-06-20T07:32:44.598Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":["https://github.com/sponsors/spatie","https://spatie.be/open-source/support-us"],"categories":[],"sub_categories":[],"readme":"\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1\" /\u003e](https://supportukrainenow.org)\n\n# Conceal e-mail addresses in a string\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/email-concealer.svg?style=flat-square)](https://packagist.org/packages/spatie/email-concealer)\n[![Build Status](https://img.shields.io/travis/spatie/email-concealer/master.svg?style=flat-square)](https://travis-ci.org/spatie/email-concealer)\n[![StyleCI](https://styleci.io/repos/88886061/shield?branch=master)](https://styleci.io/repos/88886061)\n[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/email-concealer.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/email-concealer)\n[![Total Downloads](https://img.shields.io/packagist/dt/spatie/email-concealer.svg?style=flat-square)](https://packagist.org/packages/spatie/email-concealer)\n\nConceal 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.\n\n```php\nuse Spatie\\EmailConcealer\\Concealer;\n\n$concealer = Concealer::create();\n\n$concealer-\u003econceal('info@spatie.be');\n// \"info@example.com\"\n```\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/email-concealer.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/email-concealer)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe 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](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Postcardware\n\nYou're free to use this package (it's [MIT-licensed](LICENSE.md)), 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.\n\nOur address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.\n\nWe publish all received postcards [on our company website](https://spatie.be/en/opensource/postcards).\n\n## Installation\n\nYou can install the package via composer:\n\n``` bash\ncomposer require spatie/email-concealer\n```\n\n## Usage\n\nTo conceal a string, create an `Concealer` instance. and call the `conceal` method.\n\n```php\nuse Spatie\\EmailConcealer\\Concealer;\n\n$concealer = Concealer::create();\n\n$concealer-\u003econceal('info@spatie.be');\n// \"info@example.com\"\n```\n\nThe 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. \n\n```php\n$concealer-\u003econceal('info@spatie.be,info@foo.com,info@bar.com');\n// \"info@example.com,info-1@foo.com,info-2@bar.com\"\n```\n\nEqual e-mail addresses will always conceal to the same concealed address.\n\n```php\n$concealer-\u003econceal('info@spatie.be,info@foo.com,info@spatie.be');\n// \"info@example.com,info-1@example.com,info@example.com\"\n```\n\nIf you want to use a different domain than `example.com`, use the `domain` method to set a new one.\n\n```php\n$concealer = Concealer::create()-\u003edomain('foo.com');\n\necho $concealer-\u003econceal('info@spatie.be'); // \"info@foo.com\"\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security\n\nIf you've found a bug regarding security please mail [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.\n\n## Credits\n\n- [Sebastian De Deyne](https://github.com/sebastiandedeyne)\n- [All Contributors](../../contributors)\n\n## About Spatie\n\nSpatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Femail-concealer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Femail-concealer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Femail-concealer/lists"}