Download the PHP package mailjet/laravel-mailjet without Composer
On this page you can find all versions of the php package mailjet/laravel-mailjet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mailjet/laravel-mailjet
More information about mailjet/laravel-mailjet
Files in mailjet/laravel-mailjet
Package laravel-mailjet
Short Description Laravel package for Mailjet API V3 and Laravel Mailjet Mail Transport
License MIT
Homepage https://github.com/mailjet/laravel-mailjet
Informations about the package laravel-mailjet
[](https://packagist.org/packages/mailjet/laravel-mailjet) [](https://packagist.org/packages/mailjet/laravel-mailjet) [](composer.json) [](https://laravel.com) [](LICENSE.md)
Table of contents
- Features
- Requirements
- Installation
- Configuration
- Sending mail with the Mailjet transport
- Using the Mailjet API
- Optional service providers
- Sandbox mode
- Documentation
- Testing
- Contributing
- License
Features
- ๐จ Drop-in mail transport โ set one env var and every
Mailable/Notificationgoes through Mailjet. - ๐งฉ Full API v3 wrapper โ low-level
get/post/put/deleteplus high-level helpers, built on the officialmailjet/mailjet-apiv3-phpclient. - ๐๏ธ Resource managers โ dedicated, injectable services for contacts, lists, metadata, campaigns, campaign drafts, templates and event callbacks.
- ๐งช Sandbox mode โ validate payloads in CI and local development without sending a single email.
- โก Zero-config setup โ package auto-discovery registers the provider and
Mailjetfacade for you.
Requirements
| Package | Supported versions |
|---|---|
| PHP | 7.4 ยท 8.x |
| Laravel | 9.x โ 13.x |
| Symfony Mailer / Mailjet Mailer | 6.x ยท 7.x ยท 8.x |
Installation
That's it. Package auto-discovery wires up the
MailjetServiceProvider and the Mailjet facade automatically.
Manual registration (only if auto-discovery is disabled)
**Laravel 11 and newer** โ `bootstrap/providers.php`: **Laravel 10 and older** โ `config/app.php`:
Configuration
Grab your API key and secret from the Mailjet account settings.
1. Add your credentials to .env:
2. Register the service in config/services.php:
Need to tune the API URL, version, or the transactional/common/v4 clients? See the full configuration reference.
Sending mail with the Mailjet transport
1. Select the transport in .env:
Laravel 6 and older use the
MAIL_DRIVERkey instead.
2. Declare the mailer in config/mail.php:
3. Send as usual โ no Mailjet-specific code required:
Make sure the from address is a verified Mailjet sender. More patterns (Mailjet templates, variables, custom headers) live in the examples guide.
Using the Mailjet API
Import the facade:
Low-level requests
Every call returns a Mailjet\Response, or throws a
Mailjet\LaravelMailjet\Exception\MailjetException on an API error.
Filter arguments are documented in the Mailjet API reference.
High-level helpers
Custom requests
Optional service providers
Each Mailjet resource has a focused, injectable manager. Register only the providers you use
in config/app.php (or bootstrap/providers.php on Laravel 11+):
| Service provider | Manages | Contract |
|---|---|---|
Providers\ContactsServiceProvider |
Contacts, incl. deletion (API v4) | ContactsV4Contract |
Providers\ContactsListServiceProvider |
Contact lists | ContactsListContract |
Providers\ContactMetadataServiceProvider |
Contact properties / metadata | ContactMetadataContract |
Providers\CampaignServiceProvider |
Campaigns | CampaignContract |
Providers\CampaignDraftServiceProvider |
Campaign drafts | CampaignDraftContract |
Providers\TemplateServiceProvider |
Templates | TemplateServiceContract |
Providers\EventCallbackUrlServiceProvider |
Event (webhook) callback URLs | EventCallbackUrlContract |
Then resolve the manager wherever you need it:
Sandbox mode
With MAILJET_SANDBOX=true, Mailjet validates the request and returns a successful
response without delivering any email โ ideal for staging environments and automated tests.
Details in the configuration reference.
Documentation
| Resource | Link |
|---|---|
| Configuration reference | docs/configuration.md |
| Examples (campaigns, templates, Mailables) | docs/usage.md |
| Full docs site | https://mailjet.github.io/laravel-mailjet/ |
| Mailjet API v3 | https://dev.mailjet.com/ |
| PHP API client | https://github.com/mailjet/mailjet-apiv3-php |
Testing
Contributing
Issues and pull requests are welcome โ see CONTRIBUTING.md.
License
Released under the MIT License.
All versions of laravel-mailjet with dependencies
laravel/framework Version ^9.0|^10.0|^11.0|^12.0|^13.0
mailjet/mailjet-apiv3-php Version ^1.5.6|^1.5
symfony/http-client Version ^6.0|^7.1|^8.0
symfony/mailjet-mailer Version ^6.0|^7.0|^8.0