diff options
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r-- | server/lib/emailer.ts | 6 |
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 @@ | |||
1 | import { createTransport, Transporter } from 'nodemailer' | 1 | import { createTransport, Transporter } from 'nodemailer' |
2 | import { isTestInstance } from '../helpers/core-utils' | 2 | import { isTestInstance } from '../helpers/core-utils' |
3 | import { bunyanLogger, logger } from '../helpers/logger' | 3 | import { bunyanLogger, logger } from '../helpers/logger' |
4 | import { CONFIG } from '../initializers/config' | 4 | import { CONFIG, isEmailEnabled } from '../initializers/config' |
5 | import { JobQueue } from './job-queue' | 5 | import { JobQueue } from './job-queue' |
6 | import { EmailPayload } from './job-queue/handlers/email' | 6 | import { EmailPayload } from './job-queue/handlers/email' |
7 | import { readFileSync } from 'fs-extra' | 7 | import { 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 | ||