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
Laravel mail driver package for Mailjet. It also serves as a wrapper for Mailjet API v3.
Installation
For Laravel 9.x and 10.x which also requires Symfony Mailer:
In other cases:
Configuration
You can find your Mailjet API key / secret here.
Change default mail driver and add new variables to your .env file:
Add section to the config/services.php file:
Make sure that in config/mail.php as mail sender address you are using an authorised email address configured on your Mailjet account.
Your available Mailjet email addresses and domains can be managed here.
For Laravel 7+ you also need to specify new available mail driver in config/mail.php:
Optional configuration
You can add full configuration for MailjetClient to the config/services.php file.
transactional
: settings to sendAPI clientcommon
: setting to MailjetClient accessible through the Facade Mailjetv4
: setting used for some DataProvider`s
API Wrapper usage
In order to API wrapper from this package, you first need to import Mailjet Facade in your code:
Then you can use one of the methods available in the MailjetServices class.
Low level API methods:
Mailjet::get($resource, $args, $options)
Mailjet::post($resource, $args, $options)
Mailjet::put($resource, $args, $options)
Mailjet::delete($resource, $args, $options)
High level API methods:
Mailjet::getAllLists($filters)
Mailjet::createList($body)
Mailjet::getListRecipients($filters)
Mailjet::getSingleContact($id)
Mailjet::createContact($body)
Mailjet::createListRecipient($body)
Mailjet::editListrecipient($id, $body)
All method return Mailjet\Response
or throw a MailjetException
in case of any API error.
You can also get the Mailjet API client with the method getClient()
and make your own custom request to Mailjet API.
For more information please refer to the official Mailjet API documentation.
All versions of laravel-mailjet-driver with dependencies
mailjet/mailjet-apiv3-php Version ^1.5.6|^1.5
symfony/mailjet-mailer Version ^6.0|^7.0