Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-dotdigital-mail-driver maintained by fleximize

Description
A Laravel mail driver for Dotdigital.
Author
Last update
2024/07/03 12:46 (dev-main)
License
Links
Downloads
10

Comments
comments powered by Disqus

Dotdigital Mail Driver for Laravel

This package simply extends Laravel's Mailer to provide a new Dotdigital transport that is registered under the dotdigital driver.

Usage is very simple - send a Mailable the same way you would for any other driver, but specify the dotdigital driver in the mail method.

Mail::driver('dotdigital')->send(new MyMailable());

Under the hood, this will use the dotdigital transactional email API to send the email.

Requirements

  • Laravel 10.x
  • PHP 8.2 or higher

Installation

You can install the package via composer:

composer require fleximize/laravel-dotdigital-mail-driver

Once installed, publish the configuration file:

php artisan vendor:publish --provider="Fleximize\LaravelDotdigitalMailDriver\Providers\LaravelDotdigitalMailDriverServiceProvider"

This will create a dotdigital.php file in your config directory. Here, you will need to specify the region, username, and password for your Dotdigital API user:

<?php

return [
    'region' => env('DOTDIGITAL_REGION'),
    'username' => env('DOTDIGITAL_USERNAME'),
    'password' => env('DOTDIGITAL_PASSWORD'),
];

You can then set these values in your .env file:

DOTDIGITAL_REGION=r1
DOTDIGITAL_USERNAME=my-username
DOTDIGITAL_PASSWORD=my-password

The package will automatically register the dotdigital driver within your config/mail.php file.