Email Adapter
This adapter sends the message to email using Laminas Mail.
<?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 Laminas\Mail\Message as MailMessage;
use Laminas\Mail\Transport\File as FileTransport;
use Laminas\Mail\Transport\FileOptions as FileTransportOptions;
$mailMessage = new MailMessage();
$mailTransport = new FileTransport();
$options = new FileTransportOptions([
'path'=>'/tmp'
]);
$mailTransport->setOptions($options);
$mailMessage->setTo('user@example.com');
$mailMessage->setSubject('Notification');
$mailMessage->setFrom('notification@example.com');
$email = new Email($mailMessage, $mailTransport);
$notifier = new Notifier();
$notifier->addAdapter('email', $email);
$notifier->setMessage('my message');
$notifier->notify()
See Laminas Mail for infomation on the other adapters such as SMTP and Sendmail.