Gobline\Logger\Writer\MailLogWriter
writes log information out as mail messages.
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')
->setUsername('[email protected]')
->setPassword('qwerty');
$mailer = Swift_Mailer::newInstance($transport);
$logger = new Gobline\Logger\Writer\MailLogWriter($mailer, '[email protected]', '[email protected]');
$logger->debug('hello world');
You can install the Mail Log Writer using the dependency management tool Composer. Run the require command to resolve and download the dependencies:
composer require gobline/logwriter-mail