541469799@qq.com il y a 1 an
Parent
commit
453322bc3c
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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