Resend for Laravel
Resend's official Laravel SDK, adding a mail transport, facade, webhooks, and email events to your app.
Repository Health
Technical Analysis
Resend for Laravel is the official SDK that integrates the Resend email API with Laravel and Symfony Mailer. It registers a Resend mail transport so your existing Mail facade, Mailables, and notifications send through Resend, and it exposes a Resend facade for direct access to the full API (emails, domains, contacts, audiences, and more) via the underlying resend-php client.
Beyond sending, the package wires up Resend’s webhooks to native Laravel events: a signed webhook controller verifies incoming payloads and dispatches typed events such as EmailDelivered, EmailBounced, EmailOpened, EmailClicked, and contact/domain lifecycle events. This lets you react to delivery and engagement signals with ordinary Laravel event listeners.
What You Get
- A Resend mail transport so Mail, Mailables, and notifications send via Resend
- A Resend facade wrapping the resend-php client for emails, domains, contacts, and audiences
- A signed webhook controller and middleware that verifies incoming Resend webhooks
- Typed Laravel events for delivery, opens, clicks, bounces, complaints, and lifecycle changes
- Standard Laravel config and service-provider auto-registration
Common Use Cases
- Sending transactional email through Resend using Laravel’s existing Mail API
- Managing domains, contacts, and audiences programmatically via the Resend facade
- Reacting to delivery and engagement webhooks with Laravel event listeners
Under The Hood
Architecture
ResendServiceProvider registers three things: a Resend transport via ResendTransportFactory (extending Symfony Mailer so Laravel’s Mail layer can send through Resend), a Resend facade backed by the resend-php client for direct API calls, and optional webhook routes. Inbound webhooks hit a WebhookController guarded by VerifyWebhookSignature middleware; after verification it maps each Resend event type to a dedicated Laravel event class under Events/ (EmailSent, EmailDelivered, EmailBounced, EmailOpened, EmailClicked, EmailComplained, plus contact and domain lifecycle events). An ApiKeyIsMissing exception guards misconfiguration.
Tech Stack
PHP 8.1+, depending on illuminate/http and illuminate/support (Laravel 10 through 13), symfony/mailer for the transport, and resend/resend-php as the underlying API client. It autoloads via PSR-4 under Resend\Laravel and auto-discovers its service provider.
Code Quality
The package is cleanly organized into Transport, Facades, Events, and Http (controller + middleware) namespaces, each class small and single-purpose. It ships a Pest test suite covering the facade, transport, HTTP routes, and service provider, consistent with an officially maintained vendor SDK.
API Design
Developer experience is strong: once the API key is configured, existing Laravel mail code works unchanged, and the Resend facade mirrors the resend-php API for everything else. Reacting to delivery events is as simple as listening for the provided event classes, keeping the learning curve low for Laravel developers.