Advertisement
Guest User

WOW!👊

a guest
Sep 14th, 2021
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. require __DIR__ . '/vendor/autoload.php';
  4.  
  5. $template = <<<TEMPLATE
  6.  
  7. Hello {{ user }},
  8.  
  9. Today is {{ date }}, a wonderful day to visit {{ url }}
  10.  
  11. TEMPLATE;
  12.  
  13. $m = new Mustache_Engine([
  14.     'entity_flags' => ENT_QUOTES
  15. ]);
  16.  
  17. $templateArgs = [
  18.     'user' => 'John Doe',
  19.     'date' => '14th Sep, 2021',
  20.     'url' => 'https://lowendtalk.com',
  21. ];
  22.  
  23. $emailMessage = $m->render($template, $templateArgs);
  24. echo $emailMessage;
  25.  
  26. mail('letaddict@example.com', 'Your bandwidth has been doubled!', $emailMessage);
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement