do not use $_ENV vars for mail template

This commit is contained in:
Bence Pőcze 2024-10-18 18:05:53 +02:00
parent 6cb90d5ea2
commit fc2de8e1ab
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -29,13 +29,6 @@ class Mail
{
$this->body = file_get_contents(ROOT . '/mail/' . $template . '.html');
$baseParameters = [
'APP_NAME' => $_ENV['APP_NAME'],
'BASE_URL' => $_ENV['APP_URL'],
];
$params = array_merge($baseParameters, $params);
foreach ($params as $key => $param) {
$this->body = str_replace('{{' . $key . '}}', $param, $this->body);
}