resend/resend-php
Resend PHP is an official PHP 8.1+ client for the Resend email API. Install via Composer and send transactional emails with a clean, simple interface (e.g., $resend->emails->send) in PHP or Laravel.
Pros:
emails->send() can integrate with Laravel’s queue workers for async processing).emails, contacts, automations).events API for webhooks) and queueable jobs for batch processing.Cons:
Mailable classes or notifications system (would need custom adapters).automations and events may require updates).Mail::send() with Resend::client()->emails->send().events API to trigger Laravel events (e.g., EmailSent).contacts API (e.g., on Registered events).templates API.Mail::to()->send() calls with Resend.Resend\Exceptions\ResendException) must be mapped to Laravel’s exception handler for consistent logging.retryAfter() for rate-limited requests.ResendMailer extending SwiftMailer) to integrate with Mail::raw() or notifications?contacts API)?emails->send() against Laravel’s default mailer.logs API + Laravel’s events system.Resend client to Laravel’s container for dependency injection.
$this->app->singleton(Resend::class, fn() => Resend::client(config('services.resend.api_key')));
config/services.php:
'resend' => [
'api_key' => env('RESEND_API_KEY'),
'api_url' => env('RESEND_API_URL', 'https://api.resend.com'),
],
events API) to Laravel events (e.g., resend.email.sent).ResendChannel for Laravel’s notifications system.Mockery to stub Resend API calls in unit tests.config and env to toggle between Resend and legacy mailers.if (config('mail.driver') === 'resend') {
Resend::client()->emails->send([...]);
} else {
Mail::send([...]);
}
templates API.Mail::raw() with Resend’s HTML/text payloads.users table to Resend’s contacts API).automations API.email.bounce).guzzlehttp/guzzle used by both Resend and other APIs)..env and config/services.php.Mail::send() calls with Resend::client()->emails->send().composer update to match Resend API changes.config/caching to avoid re-fetching API keys.Resend::debug(true).spatie/laravel-circuitbreaker) for Resend API failures.batch API + Laravel queues to send bulk emails efficientlyHow can I help you explore Laravel packages today?