krak / mail
Mailing library
v0.1.0
2016-06-07 22:19 UTC
Requires (Dev)
- peridot-php/peridot: ^1.18
Suggests
- swiftmailer/swiftmailer: ^5.0 for swift mailer integration
This package is auto-updated.
Last update: 2024-11-29 04:25:17 UTC
README
The mail library is a simple library for abstracting and simplifying sending emails.
Usage
<?php
$mailer = Krak\Mail\swift_html_mailer($swift_mailer);
$prefix_mailer = function($subject Krak\Mail\Recipients $recipients, $content) use ($mailer) {
return $mailer('prefix - ' . $subject, $recipients, $content);
};
$r = new Krak\Mail\Recipients();
$r->to = ['rj@bighead.net' => 'RJ Garcia'];
$prefix_mailer('Sending Email!', $r, '<h1>Header!</h1>');
For debugging purposes, there is also the echo_mailer