feat(mail): allow setting of mailer identifying name (#5363)

This commit is contained in:
David Wheatley 2022-06-11 04:15:00 +01:00 committed by GitHub
parent b78026e49f
commit 97a744556b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 0 deletions

View File

@ -57,6 +57,16 @@
:hint='$t(`admin:mail.smtpPortHint`)' :hint='$t(`admin:mail.smtpPortHint`)'
style='max-width: 300px;' 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-switch(
v-model='config.secure' v-model='config.secure'
:label='$t(`admin:mail.smtpTLS`)' :label='$t(`admin:mail.smtpTLS`)'
@ -169,6 +179,7 @@ export default {
senderEmail: '', senderEmail: '',
host: '', host: '',
port: 0, port: 0,
name: '',
secure: false, secure: false,
verifySSL: false, verifySSL: false,
user: '', user: '',
@ -192,6 +203,7 @@ export default {
senderEmail: this.config.senderEmail || '', senderEmail: this.config.senderEmail || '',
host: this.config.host || '', host: this.config.host || '',
port: _.toSafeInteger(this.config.port) || 0, port: _.toSafeInteger(this.config.port) || 0,
namer: this.config.name || '',
secure: this.config.secure || false, secure: this.config.secure || false,
verifySSL: this.config.verifySSL || false, verifySSL: this.config.verifySSL || false,
user: this.config.user || '', user: this.config.user || '',

View File

@ -18,6 +18,7 @@ mutation (
senderEmail: $senderEmail, senderEmail: $senderEmail,
host: $host, host: $host,
port: $port, port: $port,
name: $name,
secure: $secure, secure: $secure,
verifySSL: $verifySSL, verifySSL: $verifySSL,
user: $user, user: $user,

View File

@ -5,6 +5,7 @@
senderEmail senderEmail
host host
port port
name
secure secure
verifySSL verifySSL
user user

View File

@ -13,6 +13,7 @@ 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,
name: WIKI.config.mail.name,
secure: WIKI.config.mail.secure, secure: WIKI.config.mail.secure,
tls: { tls: {
rejectUnauthorized: !(WIKI.config.mail.verifySSL === false) rejectUnauthorized: !(WIKI.config.mail.verifySSL === false)

View File

@ -49,6 +49,7 @@ module.exports = {
senderEmail: args.senderEmail, senderEmail: args.senderEmail,
host: args.host, host: args.host,
port: args.port, port: args.port,
name: args.name,
secure: args.secure, secure: args.secure,
verifySSL: args.verifySSL, verifySSL: args.verifySSL,
user: args.user, user: args.user,

View File

@ -32,6 +32,7 @@ type MailMutation {
senderEmail: String! senderEmail: String!
host: String! host: String!
port: Int! port: Int!
name: String!
secure: Boolean! secure: Boolean!
verifySSL: Boolean! verifySSL: Boolean!
user: String! user: String!
@ -52,6 +53,7 @@ type MailConfig {
senderEmail: String! senderEmail: String!
host: String! host: String!
port: Int! port: Int!
name: String!
secure: Boolean! secure: Boolean!
verifySSL: Boolean! verifySSL: Boolean!
user: String! user: String!

View File

@ -103,6 +103,7 @@ module.exports = () => {
senderEmail: '', senderEmail: '',
host: '', host: '',
port: 465, port: 465,
name: '',
secure: true, secure: true,
verifySSL: true, verifySSL: true,
user: '', user: '',