20 lines
400 B
PHP
20 lines
400 B
PHP
|
<?php
|
||
|
use Slim\Views\Twig;
|
||
|
|
||
|
class Mailer
|
||
|
{
|
||
|
public static function sendMail($request, $body, $response)
|
||
|
{
|
||
|
$view = Twig::fromRequest($request);
|
||
|
|
||
|
$render = $view->render($response, "dash/email.twig", [
|
||
|
"title" => "EMAIL TESTER",
|
||
|
"header" => "Snarky Descriptor",
|
||
|
"content" => $body["content"],
|
||
|
]);
|
||
|
|
||
|
$email = $render->getBody()->getContents();
|
||
|
echo $email;
|
||
|
}
|
||
|
}
|