mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-01 00:03:18 +01:00
LSaddon::mail: Fix handling multiple recipients
This commit is contained in:
parent
34396a5fe1
commit
15e3ffe6ef
1 changed files with 2 additions and 4 deletions
|
@ -154,9 +154,7 @@ function sendMail($to, $subject, $msg, $headers=null, $attachments=null,
|
||||||
|
|
||||||
$headers["To"] = $to;
|
$headers["To"] = $to;
|
||||||
|
|
||||||
$to = array (
|
$to = ensureIsArray($to);
|
||||||
'To' => $to
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach(array_keys($headers) as $header) {
|
foreach(array_keys($headers) as $header) {
|
||||||
if(in_array(strtoupper($header), array('BCC', 'CC'))) {
|
if(in_array(strtoupper($header), array('BCC', 'CC'))) {
|
||||||
|
@ -173,7 +171,7 @@ function sendMail($to, $subject, $msg, $headers=null, $attachments=null,
|
||||||
unset($headers[$header]);
|
unset($headers[$header]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$to[strtoupper($header)] = $headers[$header];
|
$to = array_merge($to, $headers[$header]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue