PHP code example of strack / email_templates
1. Go to this page and download the library: Download strack/email_templates 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/ */
strack / email_templates example snippets
$emailTemplate = new EmailTemplate(__DIR__.'/Templates/myEmailTemplate.html', array(
'firstName' => 'John',
'senderName' => 'Max',
));
$emailBody = $emailTemplate->getBody();
$emailSubject = $emailTemplate->getSubject();
$emailTemplate = new EmailTemplate('resource://Acme.Demo/Private/Email/Template/FooBar.html', array(...));