1
0
Fork 0
mirror of synced 2024-08-04 13:01:45 +12:00

Merge branch '1.5.x' into 1.5.x-response-request-models

This commit is contained in:
Bradley Schofield 2024-01-22 10:09:42 +00:00
commit d599971c93

View file

@ -60,14 +60,11 @@ class Mails extends Action
$recipient = $payload['recipient'];
$subject = $payload['subject'];
$variables = $payload['variables'];
$variables['protocol'] = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$variables['hostname'] = App::getEnv('_APP_DOMAIN');
$name = $payload['name'];
$body = $payload['body'];
$protocol = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = App::getEnv('_APP_DOMAIN');
$body = str_replace(['{{protocol}}', '{{hostname}}'], [$protocol, $hostname], $body);
$bodyTemplate = Template::fromFile(__DIR__ . '/../../../../app/config/locale/templates/email-base.tpl');
$bodyTemplate->setParam('{{body}}', $body);
foreach ($variables as $key => $value) {