diff options
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r-- | server/lib/emailer.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 3cdba5c76..39b662eb2 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts | |||
@@ -2,8 +2,7 @@ import { readFileSync } from 'fs-extra' | |||
2 | import { merge } from 'lodash' | 2 | import { merge } from 'lodash' |
3 | import { createTransport, Transporter } from 'nodemailer' | 3 | import { createTransport, Transporter } from 'nodemailer' |
4 | import { join } from 'path' | 4 | import { join } from 'path' |
5 | import { toArray } from '@server/helpers/custom-validators/misc' | 5 | import { arrayify, root } from '@shared/core-utils' |
6 | import { root } from '@shared/core-utils' | ||
7 | import { EmailPayload } from '@shared/models' | 6 | import { EmailPayload } from '@shared/models' |
8 | import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model' | 7 | import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model' |
9 | import { isTestOrDevInstance } from '../helpers/core-utils' | 8 | import { isTestOrDevInstance } from '../helpers/core-utils' |
@@ -159,7 +158,7 @@ class Emailer { | |||
159 | subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX | 158 | subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX |
160 | }) | 159 | }) |
161 | 160 | ||
162 | const toEmails = toArray(options.to) | 161 | const toEmails = arrayify(options.to) |
163 | 162 | ||
164 | for (const to of toEmails) { | 163 | for (const to of toEmails) { |
165 | const baseOptions: SendEmailDefaultOptions = { | 164 | const baseOptions: SendEmailDefaultOptions = { |