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:
parent
56af5222c1
commit
3b3b18203f
6 changed files with 28 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue