phwoolcon / mail-renderer
Email Templating and Rendering Module for Phwoolcon
Installs: 584
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: ~5.5|~7.0
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-10-29 05:10:38 UTC
README
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 fishdrowned@gmail.com instead of using the issue tracker.
Credits
License
The Apache License, Version 2.0. Please see License File for more information.