Download the PHP package mikejestes/ornamental without Composer
On this page you can find all versions of the php package mikejestes/ornamental. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mikejestes/ornamental
More information about mikejestes/ornamental
Files in mikejestes/ornamental
Package ornamental
Short Description A library to send templated transactional emails, and easily test.
License MIT
Homepage https://github.com/mikejestes/ornamental
Informations about the package ornamental
Ornamental
A library to send templated transactional emails. Plugins for your choice of template language and mail sending library. Configuration through YAML.
Installation
Add to your composer.json
file:
Then download and run composer:
curl -s https://getcomposer.org/installer | php
php composer.phar install
Defining Messages
Yaml files configure each email message type. The filename minus .yaml
is the key when constructing a \Ornamental\Message
object.
Layouts
Layout files can be used to separate themes. The body of each individual message is injected with the body
variable, which should be unescaped in mustache ({{{body}}}
).
Configuration
Usage
Data as passed to each template by setting properties on the \Ornamental\Message
object:
Current Plugins
Templating:
- mustache (install
mustache/mustache
from composer) - php
Mail Transport:
- phpmailer (install
phpmailer/phpmailer
) - log file
Integration with unit tests
Unit tests can inspect the send log:
All versions of ornamental with dependencies
psr/log Version ~1.0
symfony/yaml Version 2.4.*
mustache/mustache Version 2.6.*
phpmailer/phpmailer Version @dev