fix(email): derive SMTP auth from credentials

This commit is contained in:
kate522 committed 2026-09-04 13:24:26 +08:00
1 parent 13fda31e37
commit dda343e398
4 files changed
+67 -29

No files matched your search

-2
View File
@@ -62,7 +62,6 @@ final class MailTemplates {
'mail_smtp_name' => '',
'mail_host' => '',
'mail_port' => 465,
'mail_smtpauth' => true,
'mail_smtpsecure' => 'ssl',
'mail_showname' => $site,
'mail_title_prefix' => '[' . $site . ']',
@@ -89,7 +88,6 @@ final class MailTemplates {
['key' => 'mail_smtp_name', 'label' => 'SMTP 用户名', 'type' => 'input', 'default' => $defaults['mail_smtp_name'], 'dependsOn' => ['key' => 'mail_smtps', 'value' => true]],
['key' => 'mail_host', 'label' => '邮件服务器地址', 'type' => 'input', 'default' => $defaults['mail_host'], 'dependsOn' => ['key' => 'mail_smtps', 'value' => true]],
['key' => 'mail_port', 'label' => 'SMTP 服务器端口', 'type' => 'number', 'default' => $defaults['mail_port'], 'min' => 1, 'max' => 65535, 'dependsOn' => ['key' => 'mail_smtps', 'value' => true]],
['key' => 'mail_smtpauth', 'label' => '启用 SMTPAuth', 'type' => 'switch', 'default' => $defaults['mail_smtpauth'], 'dependsOn' => ['key' => 'mail_smtps', 'value' => true]],
['key' => 'mail_smtpsecure', 'label' => '加密方式', 'type' => 'select', 'default' => $defaults['mail_smtpsecure'], 'options' => [['label' => 'SSL', 'value' => 'ssl'], ['label' => 'TLS', 'value' => 'tls'], ['label' => '不加密', 'value' => '']], 'dependsOn' => ['key' => 'mail_smtps', 'value' => true]],
]],
['key' => 'branding', 'title' => '邮件品牌', 'fields' => [