Download the PHP package thedoctor0/laravel-mailjet-driver without Composer
On this page you can find all versions of the php package thedoctor0/laravel-mailjet-driver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thedoctor0/laravel-mailjet-driver
More information about thedoctor0/laravel-mailjet-driver
Files in thedoctor0/laravel-mailjet-driver
Package laravel-mailjet-driver
Short Description Laravel mail driver package for Mailjet and wrapper for its API
License MIT
Homepage https://github.com/TheDoctor0/laravel-mailjet-driver
Informations about the package laravel-mailjet-driver
Laravel Mailjet Driver
A Laravel mail driver for Mailjet that also wraps the
Mailjet API v3 PHP SDK — so you can
send mail through Laravel's Mail facade and reach Mailjet's REST, Send and SMS
APIs from the same package.
Version support
| Package | Laravel | PHP |
|---|---|---|
| 2.x | 11.x – 13.x | 8.2+ |
| 1.x | 9.x – 10.x | 8.0+ |
Installation
The package registers itself automatically via Laravel's package discovery.
Configuration
Grab your API key and secret from the Mailjet API keys page, then add them to your .env file and switch the mailer:
Add the credentials to config/services.php:
Register the transport in config/mail.php:
Note: the
fromaddress in config/mail.php must be an authorised sender configured on your Mailjet account. Manage your senders and domains here.
Optional client configuration
You can pass full MailjetClient options through config/services.php:
| Key | Used for |
|---|---|
transactional |
The Send API client |
common |
The client resolved behind the Mailjet facade |
v4 |
The v4 client used by some data providers (e.g. the SMS API) |
Sending mail
Once the transport is configured, send mail the usual Laravel way — no Mailjet-specific code required:
API wrapper usage
Import the facade to talk to the Mailjet API directly:
Send API
Send transactional email through the Send API v3.1 (the default version):
SMS API
Send an SMS through the SMS API v4. The SMS API authenticates with a bearer token rather than the key/secret pair — see the Mailjet docs for issuing one:
Contacts and lists
High-level helpers for the most common contact-management calls:
Low-level API
For any endpoint without a dedicated helper, call the raw verbs with a Mailjet resource:
Every wrapper method returns a Mailjet\Response, or throws a
Mailjet\LaravelMailjet\Exception\MailjetException on an API error. You can also
reach the underlying SDK client with Mailjet::getClient() to build fully custom
requests.
For the complete endpoint reference, see the official Mailjet API documentation.
Testing
License
The MIT License (MIT). Please see the license file for more information.
All versions of laravel-mailjet-driver with dependencies
laravel/framework Version ^11.0|^12.0|^13.0
mailjet/mailjet-apiv3-php Version ^1.6
symfony/mailjet-mailer Version ^7.0|^8.0