Email: Fix handling multiple recipients
This commit is contained in:
parent
4907442122
commit
fb67ffdf3b
1 changed files with 2 additions and 4 deletions
|
@ -125,9 +125,7 @@ class Email {
|
||||||
|
|
||||||
$headers["To"] = $to;
|
$headers["To"] = $to;
|
||||||
|
|
||||||
$to = array (
|
$to = ensure_is_array($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'))) {
|
||||||
|
@ -144,7 +142,7 @@ class Email {
|
||||||
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