LaravelPackages.net
Acme Inc.
Toggle sidebar
ebethus/laravel-elastic-email-driver

A Laravel Elastic Email Driver

4.559
0
1.0.2
About ebethus/laravel-elastic-email-driver

ebethus/laravel-elastic-email-driver is a Laravel package for a laravel elastic email driver. It currently has 0 GitHub stars and 4.559 downloads on Packagist (latest version 1.0.2). Install it with composer require ebethus/laravel-elastic-email-driver. Discover more Laravel packages by ebethus or browse all Laravel packages to compare alternatives.

Last updated

Laravel Elastic Email Driver

A Laravel mail driver for Elastic Email service.

Compatibility

  • Laravel: 9.x, 10.x, 11.x, 12.x
  • PHP: 8.0+

Installation

Install the package via Composer:

composer require ebethus/laravel-elastic-email-driver

Configuration

1. Add Elastic Email Credentials

Add the following configuration to your config/services.php:

'elastic_email' => [
    'key' => env('ELASTIC_KEY'),
    'account' => env('ELASTIC_ACCOUNT'),
],

2. Set Environment Variables

Add your Elastic Email credentials to your .env file:

ELASTIC_KEY=your-elastic-email-api-key ELASTIC_ACCOUNT=your-elastic-email-account

3. Configure Mail Driver

For Laravel 9+, update your config/mail.php to add the Elastic Email mailer:

'mailers' => [
    // ... other mailers
    
    'elastic_email' => [
        'transport' => 'elastic_email',
    ],
],

Then set it as your default mailer in .env:

MAIL_MAILER=elastic_email

For older Laravel versions, set:

MAIL_DRIVER=elastic_email

Usage

This package integrates seamlessly with Laravel's mail system. Use Laravel's Mail facade as you normally would:

use Illuminate\Support\Facades\Mail;
use App\Mail\WelcomeEmail;

Mail::to('[email protected]')->send(new WelcomeEmail());

For more information on sending emails, refer to the Laravel Mail documentation.

License

This package is open-sourced software licensed under the MIT license.

Support

For issues or questions, please contact [email protected].

Comments