mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-16 00:39:40 +00:00
Updates to Email settings/manager to include test email
This commit is contained in:
parent
b8ca6671fc
commit
d54edb93d6
15 changed files with 22 additions and 1 deletions
|
|
@ -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: '<div dir="auto"></div>',
|
||||
attachments: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 }))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue