1. Go to this page and download the library: Download leuffen/template-mailer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leuffen / template-mailer example snippets
$parser = new MailTemplateParser();
$parser->loadTemplate($template);
$parser->send ($orderData);
$parser = new MailTemplateParser();
$parser->loadTemplate ($template);
$mail = $parser->apply($orderData);
$mailBody = new MailBody ("[email protected]", "Some subject", "[email protected]");
$mailBody->addPart (new MailPart ("Some Text Content", "text/plain"));
$mailBody->addPart (new MailPart ("<h1>Some Html Part</h1>", "text/html"));
$mailBody->send();
{= __CONTEXT__ | raw }
$mailTemplateParser->getTextTemplateParser()->addFilter("price", function ($input) { return number_format($input) });
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.