作者 邓超

x

... ... @@ -315,6 +315,14 @@ class Home extends Base {
if(($formData['isBcc']??0) && !empty($formData['bcc'])){
$sendData['bcc'] = $formData['bcc'];
}
// 添加自定义头信息 预热邮件
if(!empty($formData['aicc-hot'])){
$sendData['mail-header'] = [
'Aicc-Hot-Mail' => 'hot' // 预热邮件
];
}
if(count($sendData['bcc'])>10){
app()->e(['bcc_number_error',10]);
}
... ...
... ... @@ -846,7 +846,7 @@ class Imap {
// body字段必须放最后
if($header2Body=='header'){
// BODY.peek必须放最后
$filed = 'UID FLAGS INTERNALDATE RFC822.SIZE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO X-PRIORITY CONTENT-TRANSFER-ENCODING BCC IN-REPLY-TO MAIL-FOLLOWUP-TO MAIL-REPLY-TO MESSAGE-ID REFERENCES RESENT-BCC RETURN-PATH SENDER X-DRAFT-INFO)]';
$filed = 'UID FLAGS INTERNALDATE RFC822.SIZE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO X-PRIORITY CONTENT-TRANSFER-ENCODING BCC IN-REPLY-TO MAIL-FOLLOWUP-TO MAIL-REPLY-TO MESSAGE-ID REFERENCES RESENT-BCC RETURN-PATH SENDER X-DRAFT-INFO AICC-HOT-MAIL)]';
}elseif($header2Body=='body'){
$filed = 'RFC822.TEXT';
}else{
... ...
... ... @@ -172,6 +172,14 @@ class MailFun {
$mail->CharSet = 'utf-8';
$mail->Encoding = PHPMailer::ENCODING_QUOTED_PRINTABLE;
// 添加自定义头信息
if(!empty($data['mail-header']) && is_array($data['mail-header'])){
foreach ($data['mail-header'] as $k=>$v){
// 在邮件体中添加自定义标识 预热
$mail->addCustomHeader($k,$v);
}
}
// 是否验证证书
// if(in_array(parse_url($smtp['host'])['host']??'1-1',['mail.laser-tech.com.cn'])){
$mail->SMTPOptions = [
... ...