diff --git a/src/Email.php b/src/Email.php index 942443b..75941b0 100644 --- a/src/Email.php +++ b/src/Email.php @@ -125,9 +125,7 @@ class Email { $headers["To"] = $to; - $to = array ( - 'To' => $to - ); + $to = ensure_is_array($to); foreach(array_keys($headers) as $header) { if(in_array(strtoupper($header), array('BCC', 'CC'))) { @@ -144,7 +142,7 @@ class Email { unset($headers[$header]); continue; } - $to[strtoupper($header)] = $headers[$header]; + $to = array_merge($to, $headers[$header]); } }