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": [