PHP code example of peroxovy / laravel-mail-logging

1. Go to this page and download the library: Download peroxovy/laravel-mail-logging library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

peroxovy / laravel-mail-logging example snippets


'mail' => [
    'driver'    => 'custom',
    'via' => \Peroxovy\LaravelMailLogging\MailLogger::class,
    'from' => env('MAIL_LOG_FROM', '[email protected]'),
    'to' => explode(',', env('MAIL_LOG_TO', '[email protected]')),
    'level' => env('MAIL_LOG_LEVEL', 'error'),
    'subject' => env('MAIL_LOG_SUBJECT', 'This is a subject of a Log'),
    'processors' => [
        'memory_usage' => env('MAIL_LOG_MEMORY_USAGE', true),
        'memory_peak' => env('MAIL_LOG_MEMORY_PEAK', true),
        'web' => env('MAIL_LOG_WEB', true),
        'git' => env('MAIL_LOG_GIT', true),
    ],
],  

'stack' => [
        'driver' => 'stack',
        'channels' => ['daily', 'mail'],
        'ignore_exceptions' => false,
    ],

php artisan vendor:publish --provider="Peroxovy\LaravelMailLogging\Providers\MailLoggingServiceProvider"

MAIL_LOG_FROM={email address from}
MAIL_LOG_TO={email addresses divided by "," }
MAIL_LOG_SUBJECT={email subject}
MAIL_LOG_MEMORY_USAGE=true/false
MAIL_LOG_MEMORY_PEAK=true/false
MAIL_LOG_WEB=true/false
MAIL_LOG_GIT=true/false