Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require __DIR__ . '/vendor/autoload.php';
- $template = <<<TEMPLATE
- Hello {{ user }},
- Today is {{ date }}, a wonderful day to visit {{ url }}
- TEMPLATE;
- $m = new Mustache_Engine([
- 'entity_flags' => ENT_QUOTES
- ]);
- $templateArgs = [
- 'user' => 'John Doe',
- 'date' => '14th Sep, 2021',
- 'url' => 'https://lowendtalk.com',
- ];
- $emailMessage = $m->render($template, $templateArgs);
- echo $emailMessage;
- mail('letaddict@example.com', 'Your bandwidth has been doubled!', $emailMessage);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement