Skip to content

resend/resend-laravel

Folders and files

NameName
Last commit message
Last commit date
Feb 24, 2025
Feb 3, 2023
May 7, 2023
Mar 11, 2023
Jan 27, 2025
Nov 23, 2024
Feb 3, 2023
Oct 5, 2023
Feb 3, 2023
Jun 7, 2024
Feb 3, 2023
Dec 27, 2023
Feb 24, 2025
Jun 7, 2024
Mar 14, 2023

Repository files navigation

Resend for Laravel

Tests Packagist Downloads Packagist Version License


Provides Resend integration for Laravel and Symfony Mailer.

Requires PHP 8.1+

Examples

Send an email with:

Getting started

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!',
]);

Using Resend's Laravel mailer

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