jaeger-app / email
An email abstraction that works with both SwiftMailer 3 and 5 (depending on which is already available).
Requires
- php: >=5.4.0
- jaeger-app/language: ^0.1
- jaeger-app/swiftmailer: ^6.0
- jaeger-app/view: ^0.1
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2023-11-18 01:40:57 UTC
README
JaegerApp\Email
is an email abstraction that works with both SwiftMailer 3 and 5 (depending on which is already available). Note that the Email object does NOT include any version of SwiftMailer and relies on the host system to provide one.
On top of that, JaegerApp\Email
works with the JaegerApp\Language
(for copy abstraction), and JaegerApp\View
(for templating of email messages) using the Mustache templating language.
Installation
Add jaeger-app/email
as a requirement to your composer.json
:
$ composer require jaeger-app/email
Send Email
At its purest, sending an email using JaegerApp\Email
looks like the below (albeit not 100%):
$vars = array('variable1' => 'Variable1'); $email->setSubject($subject) ->setMessage($message_template) ->setTo($emails) ->addAttachment($file) ->setMailtype('html'); $email->send($vars);