LaravelPackages.net
Acme Inc.
Toggle sidebar
resend/resend-laravel

Resend for Laravel

3.343.307
124
v1.4.0
About resend/resend-laravel

resend/resend-laravel is a Laravel package for resend for laravel. It currently has 124 GitHub stars and 3.343.307 downloads on Packagist (latest version v1.4.0). Install it with composer require resend/resend-laravel. Discover more Laravel packages by resend or browse all Laravel packages to compare alternatives.

Last updated

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' => '[email protected]',
    'to' => '[email protected]',
    '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
Comments