作者 邓超

1

@@ -211,13 +211,23 @@ class Mail { @@ -211,13 +211,23 @@ class Mail {
211 } 211 }
212 212
213 $header['From'] = MailFun::toOrFrom($header['From']); 213 $header['From'] = MailFun::toOrFrom($header['From']);
  214 + // 抄送 ,密送
  215 + $cc = [];
  216 + $bcc = [];
  217 + if($header['Cc']??''){
  218 + $cc = MailFun::toOrFrom($header['Cc']);
  219 + }
  220 + if($header['Bcc']??''){
  221 + $bcc = MailFun::toOrFrom($header['Bcc']);
  222 + }
  223 +
214 224
215 $data = [ 225 $data = [
216 'msgno' => $key, 226 'msgno' => $key,
217 'uid' => $result['UID'], 227 'uid' => $result['UID'],
218 'subject' => $header['Subject'], 228 'subject' => $header['Subject'],
219 - 'cc' => $header['Cc']??'',  
220 - 'bcc' => $header['Bcc']??'', 229 + 'cc' => $cc,
  230 + 'bcc' => $bcc,
221 'from' => $header['From'][0]['email']??'', 231 'from' => $header['From'][0]['email']??'',
222 'from_name' => $header['From'][0]['name']??'', 232 'from_name' => $header['From'][0]['name']??'',
223 'to' => $header['To']?implode(',',array_column($header['To'],'email')):'', 233 'to' => $header['To']?implode(',',array_column($header['To'],'email')):'',