Sfoglia il codice sorgente

避免配置文件用autoload 发送 email SMTPDebug 和 SMTPSecure写死

visuddhinanda 4 anni fa
parent
commit
e8eb56b3b8
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      app/db/user.php
  2. 1 1
      app/ucenter/invite.php

+ 1 - 1
app/db/user.php

@@ -216,7 +216,7 @@ class User extends Table
 					$mail->SMTPAuth   = Email["SMTPAuth"];                                   //Enable SMTP authentication
 					$mail->Username   = Email["Username"];                     //SMTP username
 					$mail->Password   = Email["Password"];                               //SMTP password
-					$mail->SMTPSecure = Email["SMTPSecure"];            //Enable implicit TLS encryption
+					$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;            //Enable implicit TLS encryption
 					$mail->Port       = Email["Port"];                                    //TCP port to connect to 465; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
 					$mail->CharSet =  'UTF-8';
 					$mail->Encoding = 'base64';

+ 1 - 1
app/ucenter/invite.php

@@ -62,7 +62,7 @@ if (PHP_SAPI == "cli") {
 			$mail->SMTPAuth   = Email["SMTPAuth"];                                   //Enable SMTP authentication
 			$mail->Username   = Email["Username"];                     //SMTP username
 			$mail->Password   = Email["Password"];                               //SMTP password
-			$mail->SMTPSecure = Email["SMTPSecure"];            //Enable implicit TLS encryption
+			$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;            //Enable implicit TLS encryption
 			$mail->Port       = Email["Port"];                                    //TCP port to connect to 465; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
 			$mail->CharSet =  'UTF-8';
 			$mail->Encoding = 'base64';