Skip to content

phwoolcon/mail-renderer

Repository files navigation

mail-renderer

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Email Templating and Rendering Module for Phwoolcon

Install

Install as a phwoolcon package

bin/import-package phwoolcon/mail-renderer

Usage

Configure

The default config file will be linked to app/config/mail-renderer.php

If you need to change the options, please make a copy under production dir and modify it:

cp app/config/mail-renderer.php app/config/production/mail-renderer.php
vim app/config/production/mail-renderer.php

Create Your Own Email Templates

vim phwoolcon-package/views/email/hello/world.phtml
<?php
/* @var Phwoolcon\View\Engine\Php $this */
MailRenderer::setSubject(__('Hello world'));
?>
<h1>Hello <?= $name ?></h1>
<p>Welcome to use <code>phwoolcon/mail-renderer</code>!</p>

Render Email From Template

<?php
use MailRenderer;

list($subject, $body) = MailRenderer::renderEmail('hello/world', ['name' => 'John']);

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The Apache License, Version 2.0. Please see License File for more information.

About

Email Templating and Rendering Module for Phwoolcon

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published