LSaddon::mail : Fixed Cc and Bcc usage

This commit is contained in:
Benjamin Renard 2012-09-07 13:33:57 +02:00
parent 3f5d7a99a6
commit 417babf7e7

View file

@ -77,7 +77,20 @@ LSerror :: defineError('MAIL_01',
$headers['From'] = LSsession :: getEmailSender();
}
$headers["To"] = $to;
$to = array (
'To' => $to
);
foreach(array_keys($headers) as $header) {
if(strtoupper($header) == 'BCC') {
$to['BCC'] = $headers[$header];
}
elseif(strtoupper($header) == 'CC') {
$to['CC'] = $headers[$header];
}
}
$ret = $mail_obj -> send($to,$headers,$msg);
if ($ret instanceof PEAR_Error) {