From d54edb93d6a6261c252ab696842ff2433a47a079 Mon Sep 17 00:00:00 2001 From: daVinci2793 Date: Mon, 12 Jun 2023 04:53:51 +0000 Subject: [PATCH 1/2] Updates to Email settings/manager to include test email --- client/pages/config/email.vue | 5 +++++ client/strings/de.json | 1 + client/strings/en-us.json | 1 + client/strings/es.json | 1 + client/strings/fr.json | 1 + client/strings/gu.json | 1 + client/strings/hi.json | 1 + client/strings/hr.json | 1 + client/strings/it.json | 1 + client/strings/nl.json | 1 + client/strings/pl.json | 1 + client/strings/ru.json | 1 + client/strings/zh-cn.json | 1 + server/managers/EmailManager.js | 3 ++- server/objects/settings/EmailSettings.js | 3 +++ 15 files changed, 22 insertions(+), 1 deletion(-) diff --git a/client/pages/config/email.vue b/client/pages/config/email.vue index 1b5da829..4ba7c222 100644 --- a/client/pages/config/email.vue +++ b/client/pages/config/email.vue @@ -34,6 +34,9 @@
+
+ +
@@ -93,6 +96,7 @@ export default { secure: true, user: null, pass: null, + testAddress: null, fromAddress: null }, newEReaderDevice: { @@ -196,6 +200,7 @@ export default { secure: this.newSettings.secure, user: this.newSettings.user, pass: this.newSettings.pass, + testAddress: this.newSettings.testAddress, fromAddress: this.newSettings.fromAddress } this.savingSettings = true diff --git a/client/strings/de.json b/client/strings/de.json index 7f8d78ea..12d22141 100644 --- a/client/strings/de.json +++ b/client/strings/de.json @@ -228,6 +228,7 @@ "LabelEdit": "Bearbeiten", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Eingebettetes Cover", diff --git a/client/strings/en-us.json b/client/strings/en-us.json index fa8d35b6..ff68844f 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -228,6 +228,7 @@ "LabelEdit": "Edit", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/es.json b/client/strings/es.json index b8ff1e96..4dead10f 100644 --- a/client/strings/es.json +++ b/client/strings/es.json @@ -228,6 +228,7 @@ "LabelEdit": "Editar", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Portada Integrada", diff --git a/client/strings/fr.json b/client/strings/fr.json index 09b38183..adbda470 100644 --- a/client/strings/fr.json +++ b/client/strings/fr.json @@ -228,6 +228,7 @@ "LabelEdit": "Modifier", "LabelEmail": "E-mail", "LabelEmailSettingsFromAddress": "Expéditeur", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Sécurisé", "LabelEmailSettingsSecureHelp": "Si coché, la connexion utilisera TLS lors de la connexion au serveur. Sinon TLS est utilisé si le serveur prend en charge l'extension STARTTLS. Dans la plupart des cas, cochez si vous vous connectez au port 465. Décochez pour le port 587 ou 25. (source: nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Couverture du livre intégrée", diff --git a/client/strings/gu.json b/client/strings/gu.json index b8f63f27..e02091e4 100644 --- a/client/strings/gu.json +++ b/client/strings/gu.json @@ -228,6 +228,7 @@ "LabelEdit": "Edit", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/hi.json b/client/strings/hi.json index 788d15ab..0ea40610 100644 --- a/client/strings/hi.json +++ b/client/strings/hi.json @@ -228,6 +228,7 @@ "LabelEdit": "Edit", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/hr.json b/client/strings/hr.json index 98e2a434..d23dd7fd 100644 --- a/client/strings/hr.json +++ b/client/strings/hr.json @@ -228,6 +228,7 @@ "LabelEdit": "Uredi", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/it.json b/client/strings/it.json index a902960f..147166c4 100644 --- a/client/strings/it.json +++ b/client/strings/it.json @@ -228,6 +228,7 @@ "LabelEdit": "Modifica", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/nl.json b/client/strings/nl.json index e528b828..88217ca6 100644 --- a/client/strings/nl.json +++ b/client/strings/nl.json @@ -228,6 +228,7 @@ "LabelEdit": "Wijzig", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Ingesloten cover", diff --git a/client/strings/pl.json b/client/strings/pl.json index 330bf698..37ca5913 100644 --- a/client/strings/pl.json +++ b/client/strings/pl.json @@ -228,6 +228,7 @@ "LabelEdit": "Edytuj", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/ru.json b/client/strings/ru.json index e7646f1d..a7a71700 100644 --- a/client/strings/ru.json +++ b/client/strings/ru.json @@ -228,6 +228,7 @@ "LabelEdit": "Редактировать", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "Embedded Cover", diff --git a/client/strings/zh-cn.json b/client/strings/zh-cn.json index a9851af5..35ede28c 100644 --- a/client/strings/zh-cn.json +++ b/client/strings/zh-cn.json @@ -228,6 +228,7 @@ "LabelEdit": "编辑", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", "LabelEmbeddedCover": "嵌入封面", diff --git a/server/managers/EmailManager.js b/server/managers/EmailManager.js index 3c26d249..0c9236f8 100644 --- a/server/managers/EmailManager.js +++ b/server/managers/EmailManager.js @@ -26,7 +26,7 @@ class EmailManager { transporter.sendMail({ from: this.db.emailSettings.fromAddress, - to: this.db.emailSettings.fromAddress, + to: this.db.emailSettings.testAddress, subject: 'Test email from Audiobookshelf', text: 'Success!' }).then((result) => { @@ -54,6 +54,7 @@ class EmailManager { transporter.sendMail({ from: this.db.emailSettings.fromAddress, to: device.email, + subject: "Here is your Ebook!", html: '
', attachments: [ { diff --git a/server/objects/settings/EmailSettings.js b/server/objects/settings/EmailSettings.js index 31dcc886..40648887 100644 --- a/server/objects/settings/EmailSettings.js +++ b/server/objects/settings/EmailSettings.js @@ -10,6 +10,7 @@ class EmailSettings { this.secure = true this.user = null this.pass = null + this.testAddress = null this.fromAddress = null // Array of { name:String, email:String } @@ -26,6 +27,7 @@ class EmailSettings { this.secure = !!settings.secure this.user = settings.user this.pass = settings.pass + this.testAddress = settings.testAddress this.fromAddress = settings.fromAddress this.ereaderDevices = settings.ereaderDevices?.map(d => ({ ...d })) || [] } @@ -38,6 +40,7 @@ class EmailSettings { secure: this.secure, user: this.user, pass: this.pass, + testAddress: this.testAddress, fromAddress: this.fromAddress, ereaderDevices: this.ereaderDevices.map(d => ({ ...d })) } From d748d43efcec8ad65d85be01be05187a943b857a Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 12 Jun 2023 17:12:52 -0500 Subject: [PATCH 2/2] Fallback to using from address if test address is not set, add reset button when form has changes --- client/pages/config/email.vue | 8 +++++++- client/strings/de.json | 2 +- client/strings/en-us.json | 2 +- client/strings/es.json | 2 +- client/strings/fr.json | 2 +- client/strings/gu.json | 2 +- client/strings/hi.json | 2 +- client/strings/hr.json | 2 +- client/strings/it.json | 2 +- client/strings/nl.json | 2 +- client/strings/pl.json | 2 +- client/strings/ru.json | 2 +- client/strings/zh-cn.json | 2 +- server/managers/EmailManager.js | 2 +- 14 files changed, 20 insertions(+), 14 deletions(-) diff --git a/client/pages/config/email.vue b/client/pages/config/email.vue index 4ba7c222..d85824fe 100644 --- a/client/pages/config/email.vue +++ b/client/pages/config/email.vue @@ -40,7 +40,8 @@
- {{ $strings.ButtonTest }} + {{ $strings.ButtonReset }} + {{ $strings.ButtonTest }} {{ $strings.ButtonSave }}
@@ -121,6 +122,11 @@ export default { } }, methods: { + resetChanges() { + this.newSettings = { + ...this.settings + } + }, editDeviceClick(device) { this.selectedEReaderDevice = device this.showEReaderDeviceModal = true diff --git a/client/strings/de.json b/client/strings/de.json index 12d22141..f73b7eda 100644 --- a/client/strings/de.json +++ b/client/strings/de.json @@ -228,9 +228,9 @@ "LabelEdit": "Bearbeiten", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Eingebettetes Cover", "LabelEnable": "Aktivieren", "LabelEnd": "Ende", diff --git a/client/strings/en-us.json b/client/strings/en-us.json index ff68844f..28e98e52 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -228,9 +228,9 @@ "LabelEdit": "Edit", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Enable", "LabelEnd": "End", diff --git a/client/strings/es.json b/client/strings/es.json index 4dead10f..c7241cd0 100644 --- a/client/strings/es.json +++ b/client/strings/es.json @@ -228,9 +228,9 @@ "LabelEdit": "Editar", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Portada Integrada", "LabelEnable": "Habilitar", "LabelEnd": "Fin", diff --git a/client/strings/fr.json b/client/strings/fr.json index adbda470..c8f2f647 100644 --- a/client/strings/fr.json +++ b/client/strings/fr.json @@ -228,9 +228,9 @@ "LabelEdit": "Modifier", "LabelEmail": "E-mail", "LabelEmailSettingsFromAddress": "Expéditeur", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Sécurisé", "LabelEmailSettingsSecureHelp": "Si coché, la connexion utilisera TLS lors de la connexion au serveur. Sinon TLS est utilisé si le serveur prend en charge l'extension STARTTLS. Dans la plupart des cas, cochez si vous vous connectez au port 465. Décochez pour le port 587 ou 25. (source: nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Couverture du livre intégrée", "LabelEnable": "Activer", "LabelEnd": "Fin", diff --git a/client/strings/gu.json b/client/strings/gu.json index e02091e4..bf5f7194 100644 --- a/client/strings/gu.json +++ b/client/strings/gu.json @@ -228,9 +228,9 @@ "LabelEdit": "Edit", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Enable", "LabelEnd": "End", diff --git a/client/strings/hi.json b/client/strings/hi.json index 0ea40610..194dae29 100644 --- a/client/strings/hi.json +++ b/client/strings/hi.json @@ -228,9 +228,9 @@ "LabelEdit": "Edit", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Enable", "LabelEnd": "End", diff --git a/client/strings/hr.json b/client/strings/hr.json index d23dd7fd..d8210aea 100644 --- a/client/strings/hr.json +++ b/client/strings/hr.json @@ -228,9 +228,9 @@ "LabelEdit": "Uredi", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Uključi", "LabelEnd": "Kraj", diff --git a/client/strings/it.json b/client/strings/it.json index 147166c4..5c65773f 100644 --- a/client/strings/it.json +++ b/client/strings/it.json @@ -228,9 +228,9 @@ "LabelEdit": "Modifica", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Abilita", "LabelEnd": "Fine", diff --git a/client/strings/nl.json b/client/strings/nl.json index 88217ca6..4c56958d 100644 --- a/client/strings/nl.json +++ b/client/strings/nl.json @@ -228,9 +228,9 @@ "LabelEdit": "Wijzig", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Ingesloten cover", "LabelEnable": "Inschakelen", "LabelEnd": "Einde", diff --git a/client/strings/pl.json b/client/strings/pl.json index 37ca5913..49fa9167 100644 --- a/client/strings/pl.json +++ b/client/strings/pl.json @@ -228,9 +228,9 @@ "LabelEdit": "Edytuj", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Włącz", "LabelEnd": "Zakończ", diff --git a/client/strings/ru.json b/client/strings/ru.json index a7a71700..0d468c8d 100644 --- a/client/strings/ru.json +++ b/client/strings/ru.json @@ -228,9 +228,9 @@ "LabelEdit": "Редактировать", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "Embedded Cover", "LabelEnable": "Включить", "LabelEnd": "Конец", diff --git a/client/strings/zh-cn.json b/client/strings/zh-cn.json index 35ede28c..aefcc507 100644 --- a/client/strings/zh-cn.json +++ b/client/strings/zh-cn.json @@ -228,9 +228,9 @@ "LabelEdit": "编辑", "LabelEmail": "Email", "LabelEmailSettingsFromAddress": "From Address", - "LabelEmailSettingsTestAddress": "Test Address", "LabelEmailSettingsSecure": "Secure", "LabelEmailSettingsSecureHelp": "If true the connection will use TLS when connecting to server. If false then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false. (from nodemailer.com/smtp/#authentication)", + "LabelEmailSettingsTestAddress": "Test Address", "LabelEmbeddedCover": "嵌入封面", "LabelEnable": "启用", "LabelEnd": "结束", diff --git a/server/managers/EmailManager.js b/server/managers/EmailManager.js index 0c9236f8..cf0e4b9c 100644 --- a/server/managers/EmailManager.js +++ b/server/managers/EmailManager.js @@ -26,7 +26,7 @@ class EmailManager { transporter.sendMail({ from: this.db.emailSettings.fromAddress, - to: this.db.emailSettings.testAddress, + to: this.db.emailSettings.testAddress || this.db.emailSettings.fromAddress, subject: 'Test email from Audiobookshelf', text: 'Success!' }).then((result) => {