Email Adapter

This adapter sends the message to email using Vespula Mailer which extends PHPMailer.

<?php
require './vendor/autoload.php';

use Vespula\Notifier\Notifier;
use Vespula\Notifier\Adapter\Stdout;
use Vespula\Notifier\Adapter\Email;
use Vespula\Notifier\Adapter\Webhook;
use Vespula\Mailer\Mailer;

$mailer = new Mailer();
$mailer->addAddress('user@example.com');
$mailer->setFrom('notification@example.com');

$emailAdapter = new Email($mailer);
$notifier = new Notifier();

$notifier->addAdapter('email', $emailAdapter);
$notifier->setMessage('my message');
$notifier->notify()

See Vespula Mailer and PHPMailer for infomation on the other adapters such as File, SMTP, and Sendmail.