Looking to hire Laravel developers? Try LaraJobs

laravel-mail-file-driver maintained by mmeyer2k

Description
A Laravel Mail driver that saves messages to disk
Last update
2024/10/18 05:26 (dev-main)
Links
Downloads
238 895

Comments
comments powered by Disqus

laravel-mail-file-driver

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