Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Email Concealer Laravel Package

spatie/email-concealer

Replaces email domains in any string (e.g., dumps) to safely use production data locally without real addresses. Create a Concealer and call conceal(): info@spatie.be becomes info@example.com. Simple, fast, and handy for anonymizing text.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Data Privacy & Compliance: Enables masking real email addresses in logs, dumps, or public-facing content (e.g., GDPR/CCPA compliance) without rewriting core systems.
  • Local Development: Safely use production-like data (e.g., MySQL dumps) locally by replacing domains with placeholders (e.g., example.com), reducing risk of accidental leaks.
  • Build vs. Buy: Avoid reinventing a simple but critical utility (regex-based email obfuscation) when this package offers a lightweight, maintainable solution.
  • Roadmap Prioritization: Justifies deferring custom obfuscation tools if this package meets needs with minimal overhead. Ideal for teams prioritizing speed over bespoke features.
  • Use Cases:
    • Masking emails in error logs, support tickets, or analytics dashboards.
    • Sanitizing exported datasets (CSV, JSON) for third-party sharing.
    • Protecting demo environments with realistic but fake email domains.

When to Consider This Package

  • Adopt if:

    • Your team needs a quick, reliable way to replace email domains in strings (e.g., spatie.beexample.com).
    • You’re working with sensitive data (logs, dumps) where real emails must be obscured but structure must remain intact.
    • You prefer MIT-licensed, battle-tested open-source over custom solutions.
    • Your use case aligns with domain-level concealment (not full email obfuscation like user*@domain.com).
  • Look elsewhere if:

    • You need advanced obfuscation (e.g., partial email masking, random domain generation, or per-email customization).
    • The package’s last update (2017) is a concern for long-term maintenance (though MIT license allows forks).
    • Your emails require context-aware replacement (e.g., preserving specific domains in certain contexts).
    • You’re using PHP 8+ features (package may lack compatibility; check dependencies).
    • You need integrations (e.g., Laravel service providers, database hooks) beyond simple string manipulation.

How to Pitch It (Stakeholders)

For Executives: "This package lets us instantly mask real email addresses in logs, exports, and demos—reducing compliance risks and accidental data leaks without rewriting systems. It’s a 5-minute setup with zero ongoing cost, saving dev time while meeting GDPR/CCPA needs. Think of it as a ‘data anonymizer’ for strings, like a turnkey privacy layer for production-like environments."

For Engineering: *"Spatie’s email-concealer is a lightweight PHP package that replaces email domains (e.g., user@spatie.beuser@example.com) in any string. It’s perfect for:

  • Sanitizing MySQL dumps for local dev without exposing real emails.
  • Masking emails in logs or support tickets.
  • Quick GDPR compliance for exported datasets. No dependencies, MIT-licensed, and trivial to integrate. If you need more control (e.g., custom domains or regex tweaks), we can extend it—but this covers 90% of use cases out of the box. Tradeoff: Last updated in 2017, but it’s simple enough to fork if needed."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport