From 4f0dcb44e7f9da1059c3271eac528ceb84a07dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Thu, 13 May 2021 17:41:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/factory.php | 5 +++-- core/function.php | 2 +- functions.php | 10 ++++++++++ package.json | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/core/factory.php b/core/factory.php index 64990ff..48905e7 100644 --- a/core/factory.php +++ b/core/factory.php @@ -53,7 +53,8 @@ if ( Helper::options()->JCommentMailPort && Helper::options()->JCommentMailFromName && Helper::options()->JCommentMailAccount && - Helper::options()->JCommentMailPassword + Helper::options()->JCommentMailPassword && + Helper::options()->JCommentSMTPSecure ) { Typecho_Plugin::factory('Widget_Feedback')->finishComment = array('Email', 'send'); } @@ -65,8 +66,8 @@ class Email $mail = new PHPMailer(); $mail->isSMTP(); $mail->SMTPAuth = true; - $mail->SMTPSecure = 'ssl'; $mail->CharSet = 'UTF-8'; + $mail->SMTPSecure = Helper::options()->JCommentSMTPSecure; $mail->Host = Helper::options()->JCommentMailHost; $mail->Port = Helper::options()->JCommentMailPort; $mail->FromName = Helper::options()->JCommentMailFromName; diff --git a/core/function.php b/core/function.php index fa6dc22..982c56e 100644 --- a/core/function.php +++ b/core/function.php @@ -2,7 +2,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "6.9.3"; + return "6.9.4"; }; /* 判断是否是手机 */ diff --git a/functions.php b/functions.php index 81bd933..2044f0a 100644 --- a/functions.php +++ b/functions.php @@ -847,6 +847,16 @@ function themeConfig($form) $JCommentMailHost->setAttribute('class', 'joe_content joe_other'); $form->addInput($JCommentMailHost->multiMode()); + $JCommentSMTPSecure = new Typecho_Widget_Helper_Form_Element_Select( + 'JCommentSMTPSecure', + array('ssl' => 'ssl(默认)', 'tsl' => 'tsl'), + 'ssl', + '加密方式', + '介绍:用于选择登录鉴权加密方式' + ); + $JCommentSMTPSecure->setAttribute('class', 'joe_content joe_other'); + $form->addInput($JCommentSMTPSecure->multiMode()); + $JCommentMailPort = new Typecho_Widget_Helper_Form_Element_Text( 'JCommentMailPort', NULL, diff --git a/package.json b/package.json index 1afa92e..1f54811 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typecho-joe-next", - "version": "6.9.3", + "version": "6.9.4", "description": "A Theme Of Typecho", "main": "index.php", "keywords": [