A Monolog Handler for Mailgun
Install via composer - In the terminal:
composer require tylercd100/monolog-mailgun
use Tylercd100\Monolog\Handler\MailgunHandler;
$to = "[email protected]";
$from = "[email protected]";
$subject = "Test Email!";
$token = "1onfifaln234nfkdo02";
$domain = "test.com";
$handler = new MailgunHandler($to, $subject, $from, $token, $domain);
$logger = new Monolog\Logger('mailgun.example');
$logger->pushHandler($handler);
$logger->addCritical("Foo Bar!");