PHP code example of gobline / logwriter-mail
1. Go to this page and download the library: Download gobline/logwriter-mail 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/ */
gobline / logwriter-mail example snippets
$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');