1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Add error when email system is not configured and using the forgot

password system
This commit is contained in:
Chocobozzz 2018-12-05 15:10:45 +01:00
parent 56af5222c1
commit 3b3b18203f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 28 additions and 6 deletions

View file

@ -14,6 +14,7 @@ class Emailer {
private static instance: Emailer
private initialized = false
private transporter: Transporter
private enabled = false
private constructor () {}
@ -50,6 +51,8 @@ class Emailer {
tls,
auth
})
this.enabled = true
} else {
if (!isTestInstance()) {
logger.error('Cannot use SMTP server because of lack of configuration. PeerTube will not be able to send mails!')
@ -57,6 +60,10 @@ class Emailer {
}
}
isEnabled () {
return this.enabled
}
async checkConnectionOrDie () {
if (!this.transporter) return