PHP code example of hxm / laravel-mail-log

1. Go to this page and download the library: Download hxm/laravel-mail-log 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/ */

    

hxm / laravel-mail-log example snippets


return [
    'send_message' => [
        'save_error' => true, // enable save error to database,
        'throw_exception' => true, //If set false, exceptions during email sending will not be thrown.
    ],
    'send_swift_message' => [
        'save_error' => true, // enable save error to database,
        'throw_exception' => false, //If set false, exceptions during email sending swift message will not be thrown.
    ],
    // route config
    'route' => [
        'enable' => true,
        'domain' => null,
        'middleware' => ['web'],
        'prefix' => 'mail-logs',
        'as' => 'mail-logs'
    ],
    //prune config
    'prune' => [
        'enable' => true,  
        'days' => 30 //integer
    ]
];
bash
php artisan migrate
bash
php artisan vendor:publish --tag=maillog