作者 邓超

邮件发送代理

@@ -530,6 +530,7 @@ class Home extends Base { @@ -530,6 +530,7 @@ class Home extends Base {
530 else{ 530 else{
531 // 立即发送 531 // 立即发送
532 $email['hot_email'] = db()->cache(86400,false)->count("select count(*) from `hot_mail` where ".dbWhere(['email'=>$email['email']])); 532 $email['hot_email'] = db()->cache(86400,false)->count("select count(*) from `hot_mail` where ".dbWhere(['email'=>$email['email']]));
  533 + $email['not_proxy'] = app()->request('not_proxy');//是否要代理
533 $result = MailFun::sendEmail($sendData,$email); 534 $result = MailFun::sendEmail($sendData,$email);
534 if($result[0]){ 535 if($result[0]){
535 app()->_json(['messageId' => $result[1]]); 536 app()->_json(['messageId' => $result[1]]);
@@ -286,7 +286,7 @@ class MailFun { @@ -286,7 +286,7 @@ class MailFun {
286 } 286 }
287 }else{ 287 }else{
288 // ai邮箱才使用代理 288 // ai邮箱才使用代理
289 - if(!empty($email['hot_email'])){ 289 + if(!empty($email['hot_email'])&&empty($email['not_proxy'])){
290 $mail->Port = 9527; 290 $mail->Port = 9527;
291 $mail->send_proxy_host = implode(':',$smtp); 291 $mail->send_proxy_host = implode(':',$smtp);
292 292