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 Mail Laravel Package

jeffersongoncalves/laravel-mail

Complete email management for Laravel: logging, translated database templates with versioning, webhook delivery tracking for five providers, pixel open/click tracking, suppression lists, inline CSS, statistics, and retries.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Centralized Email Management: Consolidate email workflows (templates, tracking, analytics) into a single Laravel package, reducing reliance on fragmented solutions (e.g., separate packages for logging, tracking, or templates).
  • Multi-Locale Email Campaigns: Enable global scalability by storing email templates with translation support (spatie/laravel-translatable), eliminating the need for manual localization or third-party tools like Mailchimp.
  • Compliance & Deliverability: Automatically enforce List-Unsubscribe headers (required for Gmail/Yahoo bulk senders) and suppression lists (hard bounces/complaints) to reduce spam complaints and improve deliverability.
  • Campaign Reporting Without a Marketing Suite: As of 1.4.0, mail tags (tag() / Envelope tags) are persisted on the mail log and rolled up into a CampaignReport plus php artisan mail:campaign [tag] — giving sent, delivered, bounced, complained, distinct opens and clicks, open/click/click-to-open rates, and most-clicked links per campaign. This is the decision-grade reporting layer that previously required SendGrid/Mailchimp dashboards or a BI pipeline.
  • Analytics-Driven Iteration: Track opens, clicks, bounces, and complaints via webhooks (SES/SendGrid/etc.) or pixel tracking (SMTP-compatible), now aggregatable by campaign tag rather than only per-message, enabling data-backed optimizations for email content, timing, and targeting.
  • A/B Testing & Versioning: Maintain template version history to experiment with designs (e.g., subject lines, CTAs) and roll back if performance drops — and now compare variants side-by-side by tagging each arm and reading the campaign report.
  • Cost Efficiency: Replace paid services (e.g., SendGrid’s analytics, Mailchimp templates and campaign reporting) with self-hosted tracking, templates, and campaign rollups, reducing recurring costs while maintaining control over data.
  • Multi-Tenant SaaS: Isolate email logs, templates, and tracking per tenant using the built-in tenant() scoping, avoiding cross-tenant data leakage. Campaign tags give per-tenant, per-campaign reporting for customer-facing dashboards.
  • Offline-First Resilience: Retry failed emails (soft bounces, SMTP errors) with configurable attempts, ensuring critical notifications (password resets, alerts) aren’t lost.
  • Developer Experience: Replace ad-hoc email logic (e.g., hardcoded templates, manual logging) with a Notification Channel and CLI tools (mail:retry, mail:prune, mail:campaign), accelerating development and reducing bugs.

When to Consider This Package

  • Avoid if:
    • You’re using a headless CMS (e.g., Strapi, Contentful) or dedicated email platform (e.g., Braze, Postmark) that already handles templates/tracking/reporting.
    • Your team lacks Laravel/PHP expertise to configure webhooks, pixel tracking, database templates, or to run the new add_tags_to_mail_logs_table migration and enable laravel-mail.campaigns.enabled.
    • You need advanced segmentation (e.g., dynamic content blocks) or automated workflows (e.g., triggered sequences), which require tools like ActiveCampaign or HubSpot. Campaign reports measure sends; they do not orchestrate them.
    • Your email volume is low (<10K/month) and you only need provider-native analytics — though with 1.4.0 the self-hosted reporting is now closer to parity, so this bar is lower than before.
    • You’re locked into a specific provider (e.g., AWS SES only) and don’t need cross-provider support.
  • Consider alternatives if:
    • You prioritize visual email builders (e.g., MJML, Tailwind for email) over database-driven templates.
    • Your stack is non-Laravel (e.g., Node.js, Ruby on Rails).
    • You need real-time deliverability insights (e.g., inbox placement testing), which require third-party tools like Mailgun’s API or GlockApps.
    • You expect a full marketing-automation cockpit (segments, journeys, send-time optimization, revenue attribution). mail:campaign is a reporting primitive, not a campaign manager.

How to Pitch It (Stakeholders)

For Executives (Business/Revenue Impact)

"This package replaces fragmented email tools with a self-hosted, all-in-one solution that cuts costs and improves deliverability. Key wins:

  • Reduce spend: Eliminate recurring fees for SendGrid/Mailchimp analytics and campaign reporting — opens, clicks, bounces, complaints, and click-to-open rates are now computed in-house per campaign tag.
  • Faster, cheaper iteration: Product and marketing can launch a tagged send and read a campaign report the same day, without a data team or vendor dashboard in the loop.
  • Boost compliance: Automatically add List-Unsubscribe headers to avoid Gmail/Yahoo penalties (critical for bulk senders).
  • Scale globally: Multi-locale templates and translation support enable seamless international campaigns without manual work.
  • Recover lost revenue: Automated bounce suppression and retry logic ensure critical emails (e.g., order confirmations) aren’t lost to spam filters.
  • Data ownership: Retain full control over email data — no vendor lock-in or privacy risks from third-party trackers."

For Engineering (Technical Feasibility)

"This Laravel package supercharges our email infrastructure with minimal overhead:

  • Unified logging: All emails auto-log to a database (subject, recipients, attachments, provider metadata). With laravel-mail.campaigns.enabled, tag() / Envelope tags are stored on the log row after running the new add_tags_to_mail_logs_table migration.
  • Campaign reporting built in: CampaignReport and php artisan mail:campaign [tag] aggregate sent, delivered, bounced, complained, distinct opens and clicks, open/click/click-to-open rates, and top clicked links — no external warehouse required.
  • Template powerhouse: Store emails in the DB with Blade rendering + translations (via spatie/laravel-translatable), replacing static views or external tools. 1.4.0 also fixes text bodies by setting them on the message directly rather than resolving them as a view name, so plain-text parts render correctly.
  • Cross-provider tracking: Webhooks for SES, SendGrid, Postmark, Mailgun, Resend—no more stitching together separate APIs.
  • Pixel fallback: Works even with plain SMTP (no provider webhooks needed) via injected tracking pixels.
  • CLI & APIs: Manage emails via artisan commands (mail:retry, mail:prune, mail:campaign) or Laravel events (e.g., MailBounced to trigger user alerts).
  • SaaS-ready: Built-in multi-tenancy and polymorphic associations let us tie email logs to any model (e.g., User, Order).
  • Low risk: MIT-licensed, actively maintained (latest: 1.4.0, April 2026), integrates seamlessly with Laravel’s Mail facade, and the upgrade is additive — one migration plus a config flag, no breaking changes from 1.3.0.

For Product/Marketing (User Experience)

"This solves four critical pain points for our email workflows:

  1. Consistency: No more broken templates or hardcoded emails—database-driven templates with versioning let us iterate safely.
  2. Insights: Track opens, clicks, and bounces in real-time, so we can A/B test subject lines or CTAs without guessing.
  3. Campaign-level results: Tag a send and get a report — open rate, click rate, click-to-open rate, bounce/complaint counts, and the most-clicked links — without waiting on a vendor dashboard or an analyst.
  4. Compliance: Automatically handle unsubscribe headers and suppression lists, reducing spam complaints and legal risks. Example use cases:
  • Onboarding: Send localized welcome emails with dynamic content (e.g., {{ $user->name }}), tagged per cohort to compare which onboarding variant performs.
  • Alerts: Retry failed transactional emails (e.g., password resets) until delivered.
  • Campaigns: Trigger pixel-based tracking for marketing emails, then run mail:campaign <tag> to see which links drove engagement.
  • Newsletter iteration: Tag subject-line variants with distinct tags, compare click-to-open rates, and keep the winner in the versioned template."
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