aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 0f74d2a8c..d0874ab20 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -1,7 +1,7 @@
1import { createTransport, Transporter } from 'nodemailer' 1import { createTransport, Transporter } from 'nodemailer'
2import { isTestInstance } from '../helpers/core-utils' 2import { isTestInstance } from '../helpers/core-utils'
3import { bunyanLogger, logger } from '../helpers/logger' 3import { bunyanLogger, logger } from '../helpers/logger'
4import { CONFIG } from '../initializers/config' 4import { CONFIG, isEmailEnabled } from '../initializers/config'
5import { JobQueue } from './job-queue' 5import { JobQueue } from './job-queue'
6import { EmailPayload } from './job-queue/handlers/email' 6import { EmailPayload } from './job-queue/handlers/email'
7import { readFileSync } from 'fs-extra' 7import { readFileSync } from 'fs-extra'
@@ -40,7 +40,7 @@ class Emailer {
40 if (this.initialized === true) return 40 if (this.initialized === true) return
41 this.initialized = true 41 this.initialized = true
42 42
43 if (Emailer.isEnabled()) { 43 if (isEmailEnabled) {
44 logger.info('Using %s:%s as SMTP server.', CONFIG.SMTP.HOSTNAME, CONFIG.SMTP.PORT) 44 logger.info('Using %s:%s as SMTP server.', CONFIG.SMTP.HOSTNAME, CONFIG.SMTP.PORT)
45 45
46 let tls 46 let tls
@@ -459,7 +459,7 @@ class Emailer {
459 } 459 }
460 460
461 async sendMail (options: EmailPayload) { 461 async sendMail (options: EmailPayload) {
462 if (!Emailer.isEnabled()) { 462 if (!isEmailEnabled()) {
463 throw new Error('Cannot send mail because SMTP is not configured.') 463 throw new Error('Cannot send mail because SMTP is not configured.')
464 } 464 }
465 465