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.
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:
[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.
mailersend 0.38 — error taxonomy, attachment/inline-image encoding, endpoint version, retry semantics? Read the SDK diff, not just the driver's release notes.composer.json, and is CI green on our exact target versions with the new setup-php action?[SS]/SRE ticket naming suggests vendor-internal engineering work, which would be reassuring — confirm rather than infer.failover mailer configuration and respect transport-level timeouts?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:
smtp mailer. This proves domain authentication (SPF/DKIM/DMARC) and deliverability with no new dependency.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.
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.
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.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.
How can I help you explore Laravel packages today?