diff --git a/src/includes/addons/LSaddons.mail.php b/src/includes/addons/LSaddons.mail.php index 3d36cf51..06ff8282 100644 --- a/src/includes/addons/LSaddons.mail.php +++ b/src/includes/addons/LSaddons.mail.php @@ -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 $to The email recipient(s) * @param array $variables Variables to use to compute the template * @param array|null $headers Email headers * @param array|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