phylogram/monolog-wp-mail-handler

A Monolog Handler to send mails with wordpress' wp_mail function. This only will work in wordpress. Very simple :-)

dev-master 2020-07-31 09:55 UTC

This package is auto-updated.

Last update: 2024-05-29 04:41:55 UTC


README

This library contains one class, that can be registered to send mails with wordpress' wp_mail function. Does only work in wordpress, which is not listed as dependency in composer.

For using this, you should check out monolog's documentation: https://github.com/Seldaek/monolog/

Example:

use Monolog\Logger;
use phylogram\MonologWPMailHandler\WPMailHandler;

$logger = new Logger('channel');
$logger->pushHandler(new WPMailHandler(['any.valid@mail.addresses'], Logger::WARNING));
$logger->alert('No more coffee in office');