...
|
...
|
@@ -173,14 +173,14 @@ class MailFun { |
|
|
$mail->Encoding = PHPMailer::ENCODING_QUOTED_PRINTABLE;
|
|
|
|
|
|
// 是否验证证书
|
|
|
if(in_array(parse_url($smtp['host'])['host']??'1-1',['mail.laser-tech.com.cn'])){
|
|
|
// if(in_array(parse_url($smtp['host'])['host']??'1-1',['mail.laser-tech.com.cn'])){
|
|
|
$mail->SMTPOptions = [
|
|
|
'ssl' => [
|
|
|
'verify_peer' => false, // 有的证书和域名不匹配,这里关闭认证
|
|
|
'verify_peer_name' => false,// 有的证书和域名不匹配,这里关闭认证
|
|
|
]
|
|
|
];
|
|
|
}
|
|
|
// }
|
|
|
|
|
|
//Recipients,设置发件人
|
|
|
$mail->setFrom($email['email'], $data['nickname']??'');// 显示邮件来自谁
|
...
|
...
|
@@ -291,14 +291,14 @@ class MailFun { |
|
|
$mail->CharSet = 'utf-8';
|
|
|
$mail->Encoding = PHPMailer::ENCODING_QUOTED_PRINTABLE;
|
|
|
// 是否验证证书
|
|
|
if(in_array(parse_url($smtp['host'])['host']??'1-1',['mail.laser-tech.com.cn'])){
|
|
|
// if(in_array(parse_url($smtp['host'])['host']??'1-1',['mail.laser-tech.com.cn'])){
|
|
|
$mail->SMTPOptions = [
|
|
|
'ssl' => [
|
|
|
'verify_peer' => false, // 有的证书和域名不匹配,这里关闭认证
|
|
|
'verify_peer_name' => false,// 有的证书和域名不匹配,这里关闭认证
|
|
|
]
|
|
|
];
|
|
|
}
|
|
|
// }
|
|
|
|
|
|
|
|
|
try {
|
...
|
...
|
|