resend/resend-php
Official Resend PHP SDK (PHP 8.1+) for sending emails via the Resend API. Install with Composer, create a client with your API key, and send emails with a simple emails->send() call. Inspired by openai-php.
Unified Email Infrastructure: Replace fragmented email solutions (e.g., Mailgun, SendGrid, or custom SMTP) with a single, scalable API for transactional and marketing emails. Reduces vendor lock-in risk and simplifies compliance (e.g., GDPR, CAN-SPAM) by centralizing email logic in one package.
Laravel-Centric Roadmap:
Align with Laravel’s ecosystem by adopting a first-party-like SDK for Resend, reducing friction for teams already using Laravel’s Mail system. Enables seamless integration with Laravel’s queues, notifications, and event system (e.g., trigger emails on user.created).
Mail::to()->send() with Resend::emails()->send() for transactional emails, while keeping Laravel’s built-in mailers for templated emails.Build vs. Buy for Email Features: Buy for:
Use Cases:
{{user.name}}).php artisan resend:digest).Adopt if:
Look elsewhere if:
For Executives: *"Resend’s PHP SDK lets us ship email-driven features 3x faster by eliminating SMTP infrastructure. For example:
For Engineering: *"This is a drop-in replacement for Laravel’s Mail system for transactional emails. Key benefits:
$resend->emails->send([...]) mirrors Laravel’s syntax but uses Resend’s high-deliverability infrastructure.// Replace:
Mail::to($user)->send(new OrderShipped($order));
// With:
Resend::emails()->send([
'from' => 'orders@yourbrand.com',
'to' => $user->email,
'subject' => 'Your order is shipped!',
'html' => view('emails.order-shipped', ['order' => $order]),
]);
For Data/Compliance Teams:
"Resend handles DKIM, SPF, and DMARC out-of-the-box, reducing our risk of emails landing in spam. Their contact segmentation and webhook events also simplify GDPR compliance (e.g., track opt-outs via contacts.update). We’d retain control over template content but offload deliverability to a trusted provider."
How can I help you explore Laravel packages today?