spatie/laravel-mailcoach-sdk
The PHP SDK for working with the Mailcoach API in Laravel apps, supporting both self-hosted Mailcoach (v6+) and Mailcoach Cloud. Create campaigns, send tests, and manage email lists and subscribers with a fluent interface and simple pagination via next().
createSubscriber, subscriber() lookups by email or UUID, confirm(), unsubscribe(), delete(), and attribute/tag updates. That's enough to decide whether signup, preference center, and list-hygiene features can ship as thin app-layer workflows instead of custom Mailcoach development.createCampaign() with templates and fields, plus sendTest() and send(), means campaigns can be generated from app data (CMS entries, product announcements, digests) and staged for human review before send. This is the single strongest product pattern the package enables: draft-and-approve pipelines owned by the product team, not the marketing team's inbox.filter[email]=gmail.com) and full pagination traversal via next() make segment export, migration between providers, and lightweight sync jobs feasible without an internal API client. Reasonable candidates: onboarding sequences, waitlist→newsletter promotion, per-tenant lists.save()/delete()), exit cost is low: calls map closely to HTTP, so a swap is a bounded refactor rather than a rewrite. That materially lowers the "what if Mailcoach changes pricing" risk in the buy decision.Adopt when all of these hold:
next(), total(), currentPage(), previous()) alone justify the dependency for anything reading subscriber data at scale.Look elsewhere or plan around it when:
sendTest() are batch-shaped; there is no evidence of per-message primitives here. Evaluate Mailcoach's transactional offering or a dedicated provider separately.To executives: This is a small, free (MIT) integration library that lets our Laravel app drive Mailcoach — creating lists, syncing subscribers, and generating campaigns — without building any email infrastructure ourselves. It replaces what would be roughly one to two weeks of custom API plumbing with a composer require and a config file. It does not lock us in: the library is a thin wrapper over documented endpoints, so if we ever leave Mailcoach, replacing it is a contained refactor rather than a platform migration. The strategic decision to weigh is the ESP choice, not the SDK; this package simply makes the Mailcoach option cheaper to execute.
To engineering: Low-risk, low-ceremony dependency. Spatie-maintained, MIT, active releases, CI and changelog in place, and the API is a facade plus resource objects with save()/delete() and iterable paginated results. Costs: it pins Laravel 12–13, it only covers what the Mailcoach API covers (no webhooks, retries, or rate-limit handling documented — we build those if we need them), and it has essentially no external adoption, so we are early users and should expect to read the source rather than find answers online. Recommended posture: adopt for internal tooling and campaign-draft pipelines now; wrap all calls in our own queued jobs and a thin internal service class so the SDK stays swappable and testable.
How can I help you explore Laravel packages today?