themosis/mailjet-driver

A Themosis / Laravel / Illuminate MailJet service mail driver.

2.0.0 2020-04-17 19:16 UTC

This package is auto-updated.

Last update: 2024-04-18 03:58:35 UTC


README

This package provides a MailJet mail driver for your Themosis / Laravel / Illuminate based application.

It extends the default list of mail drivers provided by the illuminate/mail package by adding the mailjet option.

Installation

The installation is done through Composer:

composer require themosis/mailjet-driver

Usage

Set the default driver

First, specify your default mail driver as mailjet from your application environment file and add the service public and secret keys:

MAIL_DRIVER=mailjet

MAILJET_PUBLIC_KEY=1234567890
MAILJET_SECRET_KEY=1234567890

Add the MailJet service

Open (or create) the config/services.php file and add the MailJet services credentials:

return [
    'mailjet' => [
        'public' => env('MAILJET_PUBLIC_KEY'),
        'secret' => env('MAILJET_SECRET_KEY'),
        'version' => env('MAILJET_VERSION', 'v3.1')
    ],
    ...
];

Set the service provider

By default, your application has the Illuminate\Mail\MailServiceProvicer defined inside the config/app.php file. In order to enable the mailjet driver, you need to replace the default service provider by the one provided by this package, the Themosis\MailJet\MailServiceProvider like so:

return [
    'providers' => [
        // Illuminate providers...

        Themosis\MailJet\MailServiceProvider::class,

        // Application providers
    ]
];

Changelog

Please see the CHANGELOG file for more information on releases changes.

Security

If you discover any security related issues, please send an email email to julien@themosis.com.

Credits

Support us

Themosis is a webdesign agency based in Arlon, Belgium. We specialized in custom publishing web platforms and have expertise in building applications with WordPress.

We've built the Themosis framework, an open-source WordPress framework.

License

GPL-2.0-or-later. Please see LICENSE file for more information.