Package Data | |
---|---|
Maintainer Username: | resend |
Package Create Date: | 2023-02-03 |
Package Last Update: | 2025-01-30 |
Home Page: | https://resend.com/docs/send-with-laravel |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-31 03:09:40 |
Package Statistics | |
---|---|
Total Downloads: | 194,412 |
Monthly Downloads: | 29,112 |
Daily Downloads: | 1,147 |
Total Stars: | 97 |
Total Watchers: | 2 |
Total Forks: | 9 |
Total Open Issues: | 8 |
Provides Resend integration for Laravel and Symfony Mailer.
Requires PHP 8.1+
Send an email with:
First install Resend for Laravel via the Composer package manager:
composer require resend/resend-laravel
Next, you should configure your Resend API key in your application's .env
file:
RESEND_API_KEY=re_123456789
Finally, you may use the Resend
facade to access the Resend API:
use Resend\Laravel\Facades\Resend;
Resend::emails()->send([
'from' => 'onboarding@resend.dev',
'to' => 'user@gmail.com',
'subject' => 'hello world',
'text' => 'it works!',
]);
Resend for Laravel comes bundled with a Laravel mailer to make it easier to send emails. To start using the Resend mail transport, first create a new mailer definition within your application's config/mail.php
configuration file:
'resend' => [
'transport' => 'resend',
],
Note The Resend mailer will use the
RESEND_API_KEY
in your application's.env
file.
Finally, update the MAIL_MAILER
environment variable to use resend
:
MAIL_MAILER=resend