541469799@qq.com 1 سال پیش
والد
کامیت
453322bc3c
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      app/index/service/passport/MailCaptcha.php

+ 2 - 2
app/index/service/passport/MailCaptcha.php

@@ -144,10 +144,10 @@ class MailCaptcha extends BaseService
             $mail->Username = config('smtp.username');                   //SMTP username
             $mail->Password = config('smtp.password');
             $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;            //Enable implicit TLS encryption
-            $mail->Port = 465;                                    //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
+            $mail->Port = config('smtp.port');                                    //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
 
             //Recipients
-            $mail->setFrom('zhangdehua814@163.com', 'Mailer');
+            $mail->setFrom(config('smtp.from_address'), config('smtp.from_name'));
             $mail->addAddress($email, $name);     //Add a recipient
 
             //Content