laravel maintained by resent
Resent for Laravel
Official Laravel integration for Resent.
Install
composer require resent/laravel
Configure
RESENT_API_KEY=re_xxxxxxxxx
MAIL_MAILER=resent
In config/mail.php:
'mailers' => [
'resent' => [
'transport' => 'resent',
],
],
Optional:
php artisan vendor:publish --tag=resent-config
Send with Laravel Mail
use Illuminate\Support\Facades\Mail;
Mail::html('<strong>It works!</strong>', function ($message) {
$message->to('you@example.com')
->from('Acme <noreply@yourdomain.com>')
->subject('Hello from Resent');
});
Send with the bound client
use Resent\Client;
app(Client::class)->emails->send([
'from' => 'Acme <noreply@yourdomain.com>',
'to' => 'you@example.com',
'subject' => 'Hello',
'html' => '<strong>It works!</strong>',
]);
Links
- Core: resent/resent
- Symfony: resent/symfony-mailer
- Docs: developers.resent.one/sdks/php
License
MIT © Resent