David Wheatley
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
19 additions and
0 deletions
-
client/components/admin/admin-mail.vue
-
client/graph/admin/mail/mail-mutation-save-config.gql
-
client/graph/admin/mail/mail-query-config.gql
-
server/core/mail.js
-
server/graph/resolvers/mail.js
-
server/graph/schemas/mail.graphql
-
server/setup.js
|
|
@ -57,6 +57,16 @@ |
|
|
|
:hint='$t(`admin:mail.smtpPortHint`)' |
|
|
|
style='max-width: 300px;' |
|
|
|
) |
|
|
|
v-text-field( |
|
|
|
outlined |
|
|
|
v-model='config.name' |
|
|
|
:label='$t(`admin:mail.smtpName`)' |
|
|
|
required |
|
|
|
:counter='255' |
|
|
|
prepend-icon='mdi-server' |
|
|
|
persistent-hint |
|
|
|
:hint='$t(`admin:mail.smtpNameHint`)' |
|
|
|
) |
|
|
|
v-switch( |
|
|
|
v-model='config.secure' |
|
|
|
:label='$t(`admin:mail.smtpTLS`)' |
|
|
@ -169,6 +179,7 @@ export default { |
|
|
|
senderEmail: '', |
|
|
|
host: '', |
|
|
|
port: 0, |
|
|
|
name: '', |
|
|
|
secure: false, |
|
|
|
verifySSL: false, |
|
|
|
user: '', |
|
|
@ -192,6 +203,7 @@ export default { |
|
|
|
senderEmail: this.config.senderEmail || '', |
|
|
|
host: this.config.host || '', |
|
|
|
port: _.toSafeInteger(this.config.port) || 0, |
|
|
|
namer: this.config.name || '', |
|
|
|
secure: this.config.secure || false, |
|
|
|
verifySSL: this.config.verifySSL || false, |
|
|
|
user: this.config.user || '', |
|
|
|
|
|
@ -18,6 +18,7 @@ mutation ( |
|
|
|
senderEmail: $senderEmail, |
|
|
|
host: $host, |
|
|
|
port: $port, |
|
|
|
name: $name, |
|
|
|
secure: $secure, |
|
|
|
verifySSL: $verifySSL, |
|
|
|
user: $user, |
|
|
|
|
|
@ -5,6 +5,7 @@ |
|
|
|
senderEmail |
|
|
|
host |
|
|
|
port |
|
|
|
name |
|
|
|
secure |
|
|
|
verifySSL |
|
|
|
user |
|
|
|
|
|
@ -13,6 +13,7 @@ module.exports = { |
|
|
|
let conf = { |
|
|
|
host: WIKI.config.mail.host, |
|
|
|
port: WIKI.config.mail.port, |
|
|
|
name: WIKI.config.mail.name, |
|
|
|
secure: WIKI.config.mail.secure, |
|
|
|
tls: { |
|
|
|
rejectUnauthorized: !(WIKI.config.mail.verifySSL === false) |
|
|
|
|
|
@ -49,6 +49,7 @@ module.exports = { |
|
|
|
senderEmail: args.senderEmail, |
|
|
|
host: args.host, |
|
|
|
port: args.port, |
|
|
|
name: args.name, |
|
|
|
secure: args.secure, |
|
|
|
verifySSL: args.verifySSL, |
|
|
|
user: args.user, |
|
|
|
|
|
@ -32,6 +32,7 @@ type MailMutation { |
|
|
|
senderEmail: String! |
|
|
|
host: String! |
|
|
|
port: Int! |
|
|
|
name: String! |
|
|
|
secure: Boolean! |
|
|
|
verifySSL: Boolean! |
|
|
|
user: String! |
|
|
@ -52,6 +53,7 @@ type MailConfig { |
|
|
|
senderEmail: String! |
|
|
|
host: String! |
|
|
|
port: Int! |
|
|
|
name: String! |
|
|
|
secure: Boolean! |
|
|
|
verifySSL: Boolean! |
|
|
|
user: String! |
|
|
|
|
|
@ -103,6 +103,7 @@ module.exports = () => { |
|
|
|
senderEmail: '', |
|
|
|
host: '', |
|
|
|
port: 465, |
|
|
|
name: '', |
|
|
|
secure: true, |
|
|
|
verifySSL: true, |
|
|
|
user: '', |
|
|
|