541469799@qq.com 1 рік тому
батько
коміт
3d8c2c9cbf
1 змінених файлів з 7 додано та 7 видалено
  1. 7 7
      app/index/service/passport/MailCaptcha.php

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

@@ -107,8 +107,8 @@ class MailCaptcha extends BaseService
             //Content
             //$mail->isHTML(true);                                  //Set email format to HTML
             $mail->Subject = 'Password';
-            $mail->Body = 'Your captcha is ' . $smsCaptcha . '.Please use it in 15 minutes';
-            $mail->AltBody = 'This is the Your captcha for Free Shipping Vapes';
+            $mail->Body = 'Your code is ' . $smsCaptcha . '.Please use it in 15 minutes';
+            $mail->AltBody = 'This is the Your Code for Free Shipping Vapes';
 
             $mail->send();
             //echo 'Message has been sent';
@@ -138,11 +138,11 @@ class MailCaptcha extends BaseService
         try {
             //Server settings
             $mail->SMTPDebug = SMTP::DEBUG_OFF;                      //Enable verbose debug output
-            $mail->isSMTP();                                            //Send using SMTP
-            $mail->Host = 'smtp.163.com';                     //Set the SMTP server to send through
+            $mail->isSMTP();                                            //Send using SMTP             //SMTP password
+            $mail->Host = config('smtp.host');                     //Set the SMTP server to send through
             $mail->SMTPAuth = true;                                   //Enable SMTP authentication
-            $mail->Username = 'zhangdehua814@163.com';                     //SMTP username
-            $mail->Password = 'SGPMIQCKVKGIJUGQ';                               //SMTP password
+            $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`
 
@@ -164,7 +164,7 @@ class MailCaptcha extends BaseService
             //echo 'Message has been sent';
         } catch (Exception $e) {
             //echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
-            Log::error(__CLASS__ . ':' . __METHOD__, ['errMsg' => $e->getMessage(), 'mailError' => $mail->ErrorInfo]);
+            Log::error(__CLASS__ . ':' . __METHOD__ . ',error:' . $e->getMessage() . ',mailError:' . $mail->ErrorInfo);
             return false;
         }
         return true;