Weave 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

Laravel Scoped Mail Config Laravel Package

lacodix/laravel-scoped-mail-config

Send Laravel mail with dynamic, per-model mail configuration. Implement HasMailConfig on tenants, teams, users, or any model to scope SMTP and sender settings—ideal for multi-tenancy and admin-managed mail configs.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Multi-tenant and white-label email roadmap: Supports per-tenant or per-user SMTP/API credentials and “from” identity, enabling branded transactional email, enterprise BYO-SMTP, and reseller isolation without forking Laravel’s mail stack.
  • Build vs. buy: The package is a thin integration surface (HasMailConfig, ScopedMail::resolveScopeUsing, and a ScopedMail facade extending Laravel Mail). Buy/spike it if tenant-scoped mail is adjacent to the roadmap; build or fork it if tenant email configuration becomes core, security-sensitive infrastructure.
  • Feature prioritization: Can unblock enterprise or agency deals that require tenant-specific sending domains, credentials, or admin-configurable mail settings. It does not solve deliverability, retries, analytics, queue routing, or compliance—those remain product/platform decisions.
  • Operational product decisions: Enables self-serve tenant mail configuration, reducing ops tickets and manual SMTP changes. Requires explicit decisions on secret storage, validation, fallback behavior, and tenant-context handling in queues.
  • Use-case validation: Best fit is multi-tenant SaaS, marketplaces, agencies, or Laravel apps using tenant/user models—especially with spatie/laravel-multitenancy. It is not a general email platform.

When to Consider This Package

  • Consider it when you need runtime-scoped mail configuration in Laravel 11/12, especially per-tenant SMTP/from settings, admin-managed mail config, or user-specific sending credentials.
  • Consider it as a reference implementation if your team can wrap it behind an internal adapter, pin the version, and own the fallback path. With 1 GitHub star, 0 dependents, and a low overall score, treat it as unproven rather than strategic infrastructure.
  • Strong fit if you want a small facade-based integration, already use Laravel’s Mail facade, and need ScopedMail::fake()-style testability.
  • Look elsewhere or build in-house if you are single-tenant with static mail config; need vendor-backed deliverability, SLA/support, or audited compliance; require complex multi-mailer routing; operate high-volume queues where tenant context and config caching must be bulletproof; or cannot tolerate a low-adoption dependency.
  • Before adoption, run a spike covering config caching, queued mail tenant context, secret storage, missing-scope fallback, and test coverage. Estimate in-house cost too: the core interface and facade wrapper are small enough that ownership may be cheaper than dependency risk.

How to Pitch It (Stakeholders)

Executives: “This lets us offer tenant-specific email identity—branded senders, BYO SMTP, or isolated credentials—without rebuilding our mail infrastructure. It is MIT-licensed and small, but adoption is very low, so I recommend a time-boxed spike and an internal wrapper rather than org-wide standardization. If it works, it can unblock enterprise and white-label use cases; if not, the in-house fallback is limited.”

Engineering: “Implement HasMailConfig on the tenant/user model, register ScopedMail::resolveScopeUsing(...) in a service provider, and send via ScopedMail::to(...)->send(...); the facade extends Laravel Mail, and fake() is supported. Main risks are package abandonment, config-cache behavior, queue workers losing tenant context, and secret management. Wrap it behind our own mail-config service, add tests for fallback and queued sends, and be prepared to fork or replace it.”

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style