fix: add verifySSL option to mail settings
This commit is contained in:
parent
6a4b25bc28
commit
2ff0e42c1d
@ -26,7 +26,7 @@
|
|||||||
:label='$t(`admin:mail.senderName`)'
|
:label='$t(`admin:mail.senderName`)'
|
||||||
required
|
required
|
||||||
:counter='255'
|
:counter='255'
|
||||||
prepend-icon='mdi-contact-mail'
|
prepend-icon='mdi-mailbox'
|
||||||
)
|
)
|
||||||
v-text-field(
|
v-text-field(
|
||||||
outlined
|
outlined
|
||||||
@ -34,7 +34,7 @@
|
|||||||
:label='$t(`admin:mail.senderEmail`)'
|
:label='$t(`admin:mail.senderEmail`)'
|
||||||
required
|
required
|
||||||
:counter='255'
|
:counter='255'
|
||||||
prepend-icon='mdi-at'
|
prepend-icon='mdi-mailbox'
|
||||||
)
|
)
|
||||||
v-divider
|
v-divider
|
||||||
.overline.pa-4.grey--text {{ $t('admin:mail.smtp') }}
|
.overline.pa-4.grey--text {{ $t('admin:mail.smtp') }}
|
||||||
@ -66,7 +66,16 @@
|
|||||||
prepend-icon='mdi-security-network'
|
prepend-icon='mdi-security-network'
|
||||||
inset
|
inset
|
||||||
)
|
)
|
||||||
v-text-field.mt-3(
|
v-switch(
|
||||||
|
v-model='config.verifySSL'
|
||||||
|
:label='$t(`admin:mail.smtpVerifySSL`)'
|
||||||
|
color='primary'
|
||||||
|
persistent-hint
|
||||||
|
:hint='$t(`admin:mail.smtpVerifySSLHint`)'
|
||||||
|
prepend-icon='mdi-security-network'
|
||||||
|
inset
|
||||||
|
)
|
||||||
|
v-text-field.mt-8(
|
||||||
outlined
|
outlined
|
||||||
v-model='config.user'
|
v-model='config.user'
|
||||||
:label='$t(`admin:mail.smtpUser`)'
|
:label='$t(`admin:mail.smtpUser`)'
|
||||||
@ -79,7 +88,7 @@
|
|||||||
v-model='config.pass'
|
v-model='config.pass'
|
||||||
:label='$t(`admin:mail.smtpPwd`)'
|
:label='$t(`admin:mail.smtpPwd`)'
|
||||||
required
|
required
|
||||||
prepend-icon='mdi-textbox-password'
|
prepend-icon='mdi-form-textbox-password'
|
||||||
type='password'
|
type='password'
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -147,7 +156,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import { get } from 'vuex-pathify'
|
|
||||||
import mailConfigQuery from 'gql/admin/mail/mail-query-config.gql'
|
import mailConfigQuery from 'gql/admin/mail/mail-query-config.gql'
|
||||||
import mailUpdateConfigMutation from 'gql/admin/mail/mail-mutation-save-config.gql'
|
import mailUpdateConfigMutation from 'gql/admin/mail/mail-mutation-save-config.gql'
|
||||||
import mailTestMutation from 'gql/admin/mail/mail-mutation-sendtest.gql'
|
import mailTestMutation from 'gql/admin/mail/mail-mutation-sendtest.gql'
|
||||||
@ -161,6 +169,7 @@ export default {
|
|||||||
host: '',
|
host: '',
|
||||||
port: 0,
|
port: 0,
|
||||||
secure: false,
|
secure: false,
|
||||||
|
verifySSL: false,
|
||||||
user: '',
|
user: '',
|
||||||
pass: '',
|
pass: '',
|
||||||
useDKIM: false,
|
useDKIM: false,
|
||||||
@ -172,9 +181,6 @@ export default {
|
|||||||
testLoading: false
|
testLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
darkMode: get('site/dark')
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
async save () {
|
async save () {
|
||||||
try {
|
try {
|
||||||
@ -186,6 +192,7 @@ export default {
|
|||||||
host: this.config.host || '',
|
host: this.config.host || '',
|
||||||
port: _.toSafeInteger(this.config.port) || 0,
|
port: _.toSafeInteger(this.config.port) || 0,
|
||||||
secure: this.config.secure || false,
|
secure: this.config.secure || false,
|
||||||
|
verifySSL: this.config.verifySSL || false,
|
||||||
user: this.config.user || '',
|
user: this.config.user || '',
|
||||||
pass: this.config.pass || '',
|
pass: this.config.pass || '',
|
||||||
useDKIM: this.config.useDKIM || false,
|
useDKIM: this.config.useDKIM || false,
|
||||||
|
@ -4,6 +4,7 @@ mutation (
|
|||||||
$host: String!,
|
$host: String!,
|
||||||
$port: Int!,
|
$port: Int!,
|
||||||
$secure: Boolean!,
|
$secure: Boolean!,
|
||||||
|
$verifySSL: Boolean!,
|
||||||
$user: String!,
|
$user: String!,
|
||||||
$pass: String!,
|
$pass: String!,
|
||||||
$useDKIM: Boolean!,
|
$useDKIM: Boolean!,
|
||||||
@ -18,6 +19,7 @@ mutation (
|
|||||||
host: $host,
|
host: $host,
|
||||||
port: $port,
|
port: $port,
|
||||||
secure: $secure,
|
secure: $secure,
|
||||||
|
verifySSL: $verifySSL,
|
||||||
user: $user,
|
user: $user,
|
||||||
pass: $pass,
|
pass: $pass,
|
||||||
useDKIM: $useDKIM,
|
useDKIM: $useDKIM,
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
host
|
host
|
||||||
port
|
port
|
||||||
secure
|
secure
|
||||||
|
verifySSL
|
||||||
user
|
user
|
||||||
pass
|
pass
|
||||||
useDKIM
|
useDKIM
|
||||||
|
@ -46,6 +46,10 @@ defaults:
|
|||||||
company: ''
|
company: ''
|
||||||
contentLicense: ''
|
contentLicense: ''
|
||||||
logoUrl: https://static.requarks.io/logo/wikijs-butterfly.svg
|
logoUrl: https://static.requarks.io/logo/wikijs-butterfly.svg
|
||||||
|
mail:
|
||||||
|
host: ''
|
||||||
|
secure: true
|
||||||
|
verifySSL: true
|
||||||
nav:
|
nav:
|
||||||
mode: 'MIXED'
|
mode: 'MIXED'
|
||||||
theming:
|
theming:
|
||||||
|
@ -13,7 +13,10 @@ module.exports = {
|
|||||||
let conf = {
|
let conf = {
|
||||||
host: WIKI.config.mail.host,
|
host: WIKI.config.mail.host,
|
||||||
port: WIKI.config.mail.port,
|
port: WIKI.config.mail.port,
|
||||||
secure: WIKI.config.mail.secure
|
secure: WIKI.config.mail.secure,
|
||||||
|
tls: {
|
||||||
|
rejectUnauthorized: !(WIKI.config.mail.verifySSL === false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_.get(WIKI.config, 'mail.user', '').length > 1) {
|
if (_.get(WIKI.config, 'mail.user', '').length > 1) {
|
||||||
conf = {
|
conf = {
|
||||||
|
@ -50,6 +50,7 @@ module.exports = {
|
|||||||
host: args.host,
|
host: args.host,
|
||||||
port: args.port,
|
port: args.port,
|
||||||
secure: args.secure,
|
secure: args.secure,
|
||||||
|
verifySSL: args.verifySSL,
|
||||||
user: args.user,
|
user: args.user,
|
||||||
pass: (args.pass === '********') ? WIKI.config.mail.pass : args.pass,
|
pass: (args.pass === '********') ? WIKI.config.mail.pass : args.pass,
|
||||||
useDKIM: args.useDKIM,
|
useDKIM: args.useDKIM,
|
||||||
|
@ -33,6 +33,7 @@ type MailMutation {
|
|||||||
host: String!
|
host: String!
|
||||||
port: Int!
|
port: Int!
|
||||||
secure: Boolean!
|
secure: Boolean!
|
||||||
|
verifySSL: Boolean!
|
||||||
user: String!
|
user: String!
|
||||||
pass: String!
|
pass: String!
|
||||||
useDKIM: Boolean!
|
useDKIM: Boolean!
|
||||||
@ -52,6 +53,7 @@ type MailConfig {
|
|||||||
host: String!
|
host: String!
|
||||||
port: Int!
|
port: Int!
|
||||||
secure: Boolean!
|
secure: Boolean!
|
||||||
|
verifySSL: Boolean!
|
||||||
user: String!
|
user: String!
|
||||||
pass: String!
|
pass: String!
|
||||||
useDKIM: Boolean!
|
useDKIM: Boolean!
|
||||||
|
@ -104,6 +104,7 @@ module.exports = () => {
|
|||||||
host: '',
|
host: '',
|
||||||
port: 465,
|
port: 465,
|
||||||
secure: true,
|
secure: true,
|
||||||
|
verifySSL: true,
|
||||||
user: '',
|
user: '',
|
||||||
pass: '',
|
pass: '',
|
||||||
useDKIM: false,
|
useDKIM: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user