mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-22 16:33:48 +01:00
LSaddon::mail : Fixed Cc and Bcc usage
This commit is contained in:
parent
3f5d7a99a6
commit
417babf7e7
1 changed files with 14 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue