comyoo/laravel-elastic-email

Wrapper for Elastic Email HTTP api to send mails using laravel

v6.0 2024-04-16 13:15 UTC

This package is auto-updated.

Last update: 2024-10-23 15:06:34 UTC


README

A simple plugin to allow sending emails through Elastic E-Mail

Installation

You can add Laravel Elastic Email as a dependency using the composer CLI:

composer require comyoo/laravel-elastic-email

Next add the following to your config/services.php

'elastic_email' => [
	'secret' => env('ELASTIC_SECRET'),
	'username' => env('ELASTIC_USERNAME')
]

and add the correct values to your .env file.

Third disable the laravel default MailServiceProvider in config/app.php and add the new ServiceProvider

'providers' => [
    /*
     * Laravel Framework Service Providers...
     */
    ...
//    Illuminate\Mail\MailServiceProvider::class,
    Comyoo\LaravelElasticEmail\MailServiceProvider::class,
    ...
],

Finally switch your default mail provider to elastic email in your .env file by setting MAIL_DRIVER=elastic_email

Usage

This package was constructed to work exactly the same as the normal laravel mailers and thus usage is the same. For more information regarding sending email through laravel see the Laravel Documentation

This should work in Laravel 5.1 and up.