gobline/logwriter-mail

Mail Log Writer component

v2.0.0 2015-12-03 09:19 UTC

This package is auto-updated.

Last update: 2024-11-12 19:16:25 UTC


README

Gobline\Logger\Writer\MailLogWriter writes log information out as mail messages.

Usage

$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')
    ->setUsername('sender@example.com')
    ->setPassword('qwerty');

$mailer = Swift_Mailer::newInstance($transport);

$logger = new Gobline\Logger\Writer\MailLogWriter($mailer, 'sender@example.com', 'recipient@example.com');

$logger->debug('hello world');

Installation

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