in CMS October how I can save System log file For all emails

117 views Asked by At

I would like to send an email in addition to any email that will be kept logged in the system I would be happy to help

Mail::send('acme.blog::mail.welcome', $vars, function($message) {

    $message->from('[email protected]', 'October');
    $message->to('[email protected]')->cc('[email protected]');

});

after that I want to keep a log file in the system

1

There are 1 answers

0
Sergey Zakharevich On

you can save the parameters the email to the json format and put the data to log.

Mail::send('acme.blog::mail.welcome', $vars, function($message) {

    $message->from('[email protected]', 'October');
    $message->to('[email protected]')->cc('[email protected]');

});
$vars['template'] = 'acme.blog::mail.welcome';
$vars['email_to'] = '[email protected]';
$vars['email_from'] = '[email protected]';
$vars = json_encode($vars, true);
\Log::info($vars);