PHP code example of tylercd100 / monolog-mailgun
1. Go to this page and download the library: Download tylercd100/monolog-mailgun 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/ */
tylercd100 / monolog-mailgun example snippets
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!");