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

mailersend/laravel-driver

Official MailerSend mail driver for Laravel. Send transactional email through MailerSend’s API using Laravel’s native Mail facade, with a drop-in transport that supports templates, attachments, tags, and webhooks. Simple configuration and reliable delivery for Laravel apps.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged. The package remains a thin adapter over Laravel's MailManager: it registers a custom Symfony Mailer transport so that MAIL_MAILER=mailersend routes all Mail/Notification traffic through MailerSend's API. It plugs into the existing pipeline — Mailables, queued mail, markdown mail, Mail::fake() — with no application-code changes. Scope is still deliberately narrow: it sends. Templates, inbound routing, analytics, and webhooks remain in the MailerSend API/SDK and are not covered here, so feature work beyond "deliver this message" is a separate integration. v3.2.0 does not alter this boundary.

Integration feasibility. Low effort, and unchanged by v3.2.0. composer require mailersend/laravel-driver, add a mailer block to config/mail.php, set MAILERSEND_API_KEY and MAIL_MAILER. It transitively pulls the mailersend/mailersend PHP SDK — now pinned to 0.38 as of this release. The real work remains validation, not wiring: confirm composer constraints against our Laravel and PHP versions, exercise queued mail and attachments through our heaviest Mailables in staging, and verify per-message from/reply-to overrides survive the transport. The SDK bump means the validation pass should be re-run at v3.2.0 rather than inherited from whatever version we last certified.

Technical risk. Adoption risk still dominates. Small star count and effectively no dependents means no community blast radius — a defect in the driver blocks all outbound mail, and there is no crowd to have already found it. Offsetting factors are strong and unchanged: MIT license permits vendoring/forking, the code surface is small enough to audit in an afternoon, and MailerSend publishes an SMTP relay that gives us a code-free fallback.

What v3.2.0 changes. Two items, neither a declared breaking change:

  • CI setup-php bump ([SS] feature/sre-10189/switch-setup-php) — build tooling only. Zero runtime impact. Weak but positive signal: the vendor is investing in its own CI, which is a prerequisite for the version-matrix confidence we need.
  • mailersend SDK dependency → 0.38 — this is the runtime-relevant change and the one that carries risk. A transport driver's observable behavior (endpoint paths, request shape, attachment encoding, error taxonomy) is largely inherited from the SDK it wraps. A bump in a 0.x SDK is, by semver convention, permitted to break. We cannot tell from these release notes whether 0.38 changes error mapping, attachment handling, or batching behavior — the changelog is two PR titles with no description.

Secondary architectural risk is unchanged: an API driver issues one HTTP call per message, so high-volume or bursty sends may not match the SDK's batch endpoints or our current throughput.

Key questions.

  • Does the driver batch recipients, or one API call per message?
  • What actually changed in mailersend 0.38 — error taxonomy, attachment/inline-image encoding, endpoint version, retry semantics? Read the SDK diff, not just the driver's release notes.
  • Which Laravel/PHP ranges are in composer.json, and is CI green on our exact target versions with the new setup-php action?
  • Is the driver maintained by MailerSend itself (vendor-owned) or a third party? The [SS]/SRE ticket naming suggests vendor-internal engineering work, which would be reassuring — confirm rather than infer.
  • Does it participate in Laravel's failover mailer configuration and respect transport-level timeouts?
  • Does a 4xx (suppression, invalid recipient) surface as a retryable transport exception that a queue worker will hammer indefinitely — and did 0.38 change that classification?
  • How are attachments and inline images handled — streamed or base64-inlined?

Integration Approach

Stack fit. Native. Any Laravel app already using the Mail facade needs zero refactoring; the driver sits at the transport boundary, which is the cleanest possible seam and keeps the decision reversible.

Migration path. Three stages, each independently valuable:

  1. Route through MailerSend's SMTP relay using the stock smtp mailer. This proves domain authentication (SPF/DKIM/DMARC) and deliverability with no new dependency.
  2. Swap to the API driver behind config for a canary stream. Target v3.2.0 specifically — do not let the resolver pick an earlier version, since the SDK pin differs. Rollback is a one-line env change.
  3. Split mailers — separate mailersend entries per stream (transactional vs. lifecycle) so rate limits and sender reputations stay isolated.

Do not decommission the incumbent ESP until domain auth is verified and a parallel-send bake period has passed.

Compatibility. Gate the decision on the composer constraint versus our Laravel minor, and check whether the transport implements Symfony's TransportInterface (Laravel 9+) or the legacy Swift path. Commit the lockfile and pin the exact driver version and the resolved mailersend 0.38 — the pairing matters, because a future composer update can silently move the SDK under a fixed driver. Queued mail needs no code change but does require a worker redeploy to pick up new config. Local and CI are unaffected: keep log/array mailers in local env, and note that Mail::fake() is transport-agnostic, so the existing test suite does not change at all.

Sequencing. Secrets into the vault (not committed .env) → staging with a sandbox domain and low-volume canary → production on one non-critical notification stream → full cutover. Because v3.2.0 touches the sending SDK, run the staging validation (queued mail, attachments, inline images, per-message overrides, failure/retry behavior) as a deliberate regression gate rather than assuming parity with a prior version. Template and webhook work is a distinct, later track that bypasses this package entirely; scope it separately so driver adoption isn't blocked on it.

Operational Impact

Maintenance. Vendor-maintained with a recent release and a permissive license — low steady-state cost. Two refinements from this release: (a) the new outside contributor is a mild positive for bus factor, but with near-zero dependents we remain effectively the only production consumer, so if the vendor deprioritizes the repo we own the patches; budget a fork-and-vendor contingency (small, given the surface area). (b) The driver is coupled to both the PHP SDK and Symfony Mailer, and the SDK has not reached 1.0 — treat every mailersend minor bump as potentially breaking and pin both layers. Put the pair on the dependency-review list rather than treating either as inert, and require a changelog read before any bump.

Support. Support flows to MailerSend's commercial support, not the repository — so the vendor SLA matters far more than the package's GitHub activity. The escalation path is thin: no community forum, no downstream users to consult. Internal troubleshooting must lean on MailerSend's API logs and our own send-failure telemetry. Note that this release's notes are unusually terse (two PR titles, no description); if that is the vendor's norm, we should expect to read source and SDK diffs ourselves to understand changes, and should factor that into upgrade estimates.

Scaling. Throughput is bounded by MailerSend's rate limits, per-message HTTP round-trips, and queue-worker concurrency — not by the driver's code. Queued mail is mandatory for user-facing flows, since each send is a network round-trip. Size and rate-limit the mail queue explicitly; above roughly 10k/day, plan to batch at the application layer or call the SDK's bulk endpoints directly rather than relying on this transport.

Failure modes.

  • Retry storms / duplicates. API errors surface as transport exceptions; queued jobs retry and may duplicate or exhaust attempts. Configure explicit tries/backoff and a failover mailer chain to a secondary provider. Re-verify the 4xx classification after 0.38 — a changed error mapping is the most plausible silent regression from this release.
  • Silent blackhole. A rotated or revoked API key fails every send. Alert on send-failure rate and queue depth, not just application exceptions.
  • Deliverability drift. Domain-auth or reputation problems don't raise errors, they just reduce inbox placement. Monitor bounce/complaint rates in MailerSend — the driver provides no feedback loop.
  • Suppression rejections. Unsubscribed/bounced addresses return generic failures; classify them so they don't burn queue retries.
  • Upgrade-induced regression. Because behavior is inherited from the SDK, a driver or transitive SDK bump can change wire format or error handling without any application change. Mitigate with pinned versions and a staging send-regression check on every bump.

Ramp-up. Under a day for an engineer familiar with Laravel mail; the driver is not the hard part. The genuinely time-consuming work is DNS/domain authentication, IP and domain warm-up, and observability (send-failure dashboards, queue-depth alerts, provider failover). Budget roughly one sprint of combined engineering and ops effort to reach production-grade, with the majority of it outside this package. Add a few hours for the v3.2.0-specific work: reading the SDK 0.38 diff and running the staging regression pass.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console