From b46297e71c5a10487419c5a982e4e8de8beb477e Mon Sep 17 00:00:00 2001 From: XiaoLFeng Date: Fri, 5 May 2023 17:16:27 +0800 Subject: [PATCH] =?UTF-8?q?SendMail=E8=B0=83=E8=AF=95=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/Mailer/SendMail.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/class/Mailer/SendMail.php b/class/Mailer/SendMail.php index dfef651..390b346 100644 --- a/class/Mailer/SendMail.php +++ b/class/Mailer/SendMail.php @@ -21,8 +21,10 @@ class SendMail protected static array $ConfigData; public static int $ExpTime; public static string $WebTitle; + protected static ?string $GCode; protected PHPMailer $Mail; public static string $SendMailError; + public static string $getDomain; /** * @return void 导入文件,无具体返回值 @@ -40,6 +42,7 @@ public function __construct() // 参数赋予 self::$ExpTime = $Array_ConfigData["Mail"]['ExpDate']; self::$WebTitle = $Array_ConfigData["Web"]['Title']; + self::$getDomain = $Array_ConfigData["Web"]['Domain']; // 导入类 $this->Mail = new PHPMailer(true); @@ -79,6 +82,7 @@ public function PostMail(string $EmailReceiver, int $EmailType, string $OtherPus { self::$EmailType = $EmailType; self::$EmailReceiver = $EmailReceiver; + self::$GCode = $OtherPush; // 尝试邮件发送 try { @@ -111,7 +115,7 @@ public function PostMail(string $EmailReceiver, int $EmailType, string $OtherPus protected function EmailRegister(): void { $this->Mail->Subject = self::$ConfigData['Name'] . ' - 站点注册'; // 邮箱标题 - $this->Mail->Body = MailTemplate::Templates(); + $this->Mail->Body = MailTemplate::Templates(self::$GCode); } protected function EmailLogin(): void