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