timfeid / laravel-sendgrid
Add sendgrid api methods to Laravel's Mail
Installs: 574
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/timfeid/laravel-sendgrid
Requires
- illuminate/mail: ~5.5
- swiftmailer/swiftmailer: ~6.0
This package is not auto-updated.
Last update: 2025-09-28 06:11:17 UTC
README
Installation
config/app.php
// Remove or comment out: // Illuminate\Mail\MailServiceProvider::class, // Add TimFeid\LaravelSendgrid\LaravelSendgridServiceProvider::class,
config/services.php
'sendgrid' => [ 'api_key' => env('SENDGRID_API_KEY'), ],
.env
SENDGRID_API_KEY=[your_api_key]
Usage
Mail::send('email.forgot-password', [], function ($mail) { // Added category functionality $mail->category('forgot-password'); // Added custom arguments functionality $mail->uniqueArgs(['user_id' => 1]); // Default Laravel functionality $mail->to('email@address.com'); $mail->subject('Crazy subject'); });