|
@@ -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;
|