mmeyer2k/laravel-mail-file-driver

There is no license information available for the latest version (0.0.2) of this package.

A Laravel Mail driver that saves messages to disk

0.0.2 2024-10-18 03:26 UTC

This package is auto-updated.

Last update: 2024-12-18 03:53:38 UTC


README

A Laravel Mail driver that saves messages to disk for testing/ci purposes.

Install

composer require mmeyer2k/laravel-mail-file-driver '0.0.1'

Replace default laravel mail manager in /config/app.php

return [
  'providers' => [
    # ...
    
    #Illuminate\Mail\MailServiceProvider::class,
    Mmeyer2k\LaravelMailFile\MailFileServiceProvider::class,
    
    # ...
  ],
];

Add to .env

MAIL_DRIVER=file

Custom storage location in .env

By default, messages are saved to path returned by sys_get_temp_dir().

MAIL_FILE_PATH=/path/to/storage