set -eu
-if [ ! -f "./client/dist/en_US/index.html" ]; then
- echo "client/dist/en_US/index.html does not exist, compile client files..."
+if [ ! -f "./client/dist/en-US/index.html" ]; then
+ echo "client/dist/en-US/index.html does not exist, compile client files..."
npm run build:client -- --light
fi
return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
}
- sendMail (options: EmailPayload) {
+ async sendMail (options: EmailPayload) {
if (!Emailer.isEnabled()) {
throw new Error('Cannot send mail because SMTP is not configured.')
}
? options.fromDisplayName
: WEBSERVER.HOST
- return this.transporter.sendMail({
- from: `"${fromDisplayName}" <${CONFIG.SMTP.FROM_ADDRESS}>`,
- replyTo: options.replyTo,
- to: options.to.join(','),
- subject: options.subject,
- text: options.text
- })
+ for (const to of options.to) {
+ await this.transporter.sendMail({
+ from: `"${fromDisplayName}" <${CONFIG.SMTP.FROM_ADDRESS}>`,
+ replyTo: options.replyTo,
+ to,
+ subject: options.subject,
+ text: options.text
+ })
+ }
}
private dieOnConnectionFailure (err?: Error) {