- How do I install resend/resend-laravel in a Laravel application?
- Install it with Composer by running composer require resend/resend-laravel. Then add your Resend API key as RESEND_API_KEY in the .env file. After that you can call the Resend facade directly or configure the bundled mailer transport.
- What Laravel and PHP versions does resend-laravel support?
- The package requires PHP 8.1 or newer and targets modern Laravel releases. Its technical assessment lists support for Laravel 11 through 13.x and notes that older versions such as Laravel 9 are deprecated. Check the package requirements before upgrading an older application.
- How do I configure the RESEND_API_KEY in Laravel?
- Add RESEND_API_KEY=re_123456789 to your application's .env file, using your real Resend API key. The facade and the bundled Resend mailer both read this value. For multi-environment setups, manage the key through per-environment .env files or a secrets manager rather than committing it.
- How do I switch Laravel's mailer to Resend?
- Add a mailer definition in config/mail.php with 'transport' => 'resend', then set MAIL_MAILER=resend in your .env file. The Resend mailer uses the RESEND_API_KEY from your environment. This lets existing Laravel mail flows send through Resend with minimal configuration changes.
- What is the difference between the Resend facade and the Resend mailer transport?
- The Resend facade calls the Resend API directly, for example Resend::emails()->send([...]), and is useful for explicit API-style sends. The mailer transport plugs into Laravel's native mail system, so Mailables, notifications, and other mail flows can send through Resend by changing MAIL_MAILER. Both approaches use the same RESEND_API_KEY, and the facade also supports idempotency keys and tags.
- Can I send Laravel Mailables and queued emails with Resend?
- Yes. Because resend-laravel provides a Symfony Mailer transport for Laravel, Mailables can be sent through Resend once MAIL_MAILER=resend is configured. Laravel's queue system can also be used for asynchronous email delivery, which helps avoid blocking requests on email API latency.
- Does resend-laravel support email attachments?
- The package supports attachments through the Resend integration, but complex cases such as very large files or dynamically generated attachments should be tested carefully. Validate attachment behavior in staging before relying on it for critical transactional email. If your use case is unusual, you may need custom handling around the Resend API.
- How do I handle Resend webhooks in Laravel?
- resend-laravel includes a VerifyWebhookSignature middleware for validating incoming Resend webhook requests. The package provides event handling for events such as email.failed, email.received, and contact/webhook events, enabling real-time tracking and automation. Make sure your infrastructure can handle retries and failures when processing webhooks.
- How should I test Resend emails in Laravel CI/CD?
- Mock Resend's API or use a staging environment rather than sending real email from CI. Test non-critical flows such as password resets first, then cover attachments and webhook handling. Include queue and failure-path tests so email delivery issues do not surprise you in production.
- What production concerns should I consider before using resend-laravel?
- The integration is low-coupling and requires no database migrations, but it does tie your email delivery to Resend's API and pricing. Consider a fallback mailer such as SMTP, monitor email volume and costs, and ensure webhook processing is resilient. Also review Resend's data residency and compliance terms if your application has GDPR, HIPAA, or similar requirements.