mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 14:33:49 +01:00
LSaddon::mail: fix handling the parameter of the sendMailFromTemplate function
This commit is contained in:
parent
d6a080c22c
commit
60a78290a9
1 changed files with 3 additions and 1 deletions
|
@ -403,7 +403,7 @@ function get_mail_template_saved_path($template, $extension) {
|
|||
/**
|
||||
* Send email from template
|
||||
* @param string $tplname The email template name
|
||||
* @param string $to The email recipient
|
||||
* @param string|array<string> $to The email recipient(s)
|
||||
* @param array<string,mixed> $variables Variables to use to compute the template
|
||||
* @param array<string,string>|null $headers Email headers
|
||||
* @param array<string,string>|null $attachments Email attachments as an array with
|
||||
|
@ -431,6 +431,8 @@ function sendMailFromTemplate(
|
|||
if (is_array($variables))
|
||||
array_map([$smarty, "assign"], array_keys($variables), array_values($variables));
|
||||
|
||||
$to = ensureIsArray($to);
|
||||
|
||||
try {
|
||||
$subject = $smarty -> fetch("file:{$tpl['subject']}");
|
||||
// Multiple line from subject cause problem, trim it and only the first line
|
||||
|
|
Loading…
Reference in a new issue