| Package Data | |
|---|---|
| Maintainer Username: | robrogers3 |
| Maintainer Contact: | robrogers@me.com (Rob Rogers) |
| Package Create Date: | 2016-11-11 |
| Package Last Update: | 2019-12-20 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-27 03:21:10 |
| Package Statistics | |
|---|---|
| Total Downloads: | 5,168 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 7 |
| Total Watchers: | 1 |
| Total Forks: | 2 |
| Total Open Issues: | 0 |
Larajet is a mail transport for Laravel. It is a MailJet integration package. Much like Mailgun, this allows for sending Mail via the mailjet api (based on Mailjet API v3.) It supports Mailables and Notifables.
Sboo had already done a lot of the heavy lifting.
Via Composer
$ composer require robrogers/larajet
You will need to update app.php
In Package Service Providers add
Larajet\MailjetServiceProvider::class
Also, add this line to the 'aliases' array 'MailJet' => Larajet\Facades\MailJet::class,
Then you need to configure services.php. Add this:
'mailjet' => [
'public_key' => env('MAILJET_PUBLIC_KEY'),
'private_key' => env('MAILJET_PRIVATE_KEY'),
'from' => env('MAIL_FROM'),
'driver' => env('MAIL_DRIVER'),
'guzzle' => [],
'api_url' => 'https://api.mailjet.com/v3/send'
],
You will need to update your .env file accordingly.
The best way is to create a Mailable. e.g.
php artisan make:mail TestMail
Then just mail it!
use App\Mail\TestMail;
Mail::to(fred@example.com)
->subject('Test Mail')
->send(new TestMail);
Learn about Mailables
Please see CHANGELOG for more information what has changed recently.
$ composer test
There is only one test. It tests the mail was sent.
Basically the steps are:
A route might look like:
use App\Mail\TestMail;
Route::get('/sendmail', function() {
Mail::to(\App\User::first()->email)
->send(new TestMail);
return 'sent?';
});
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email robrogers@me.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.