do not use $_ENV vars for mail template

This commit is contained in:
bence committed 2024-10-18 18:05:53 +02:00
1 parent 6cb90d5ea2
commit fc2de8e1ab
1 file changed
-7
-7
View File
@@ -29,13 +29,6 @@ class Mail
{ {
$this->body = file_get_contents(ROOT . '/mail/' . $template . '.html'); $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) { foreach ($params as $key => $param) {
$this->body = str_replace('{{' . $key . '}}', $param, $this->body); $this->body = str_replace('{{' . $key . '}}', $param, $this->body);
} }