diff options
-rwxr-xr-x | scripts/dev/server.sh | 4 | ||||
-rw-r--r-- | server/lib/emailer.ts | 18 |
2 files changed, 12 insertions, 10 deletions
diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh index b4675c57f..beee5b8d4 100755 --- a/scripts/dev/server.sh +++ b/scripts/dev/server.sh | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | if [ ! -f "./client/dist/en_US/index.html" ]; then | 5 | if [ ! -f "./client/dist/en-US/index.html" ]; then |
6 | echo "client/dist/en_US/index.html does not exist, compile client files..." | 6 | echo "client/dist/en-US/index.html does not exist, compile client files..." |
7 | npm run build:client -- --light | 7 | npm run build:client -- --light |
8 | fi | 8 | fi |
9 | 9 | ||
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index bd3d4f252..523b11d0d 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts | |||
@@ -441,7 +441,7 @@ class Emailer { | |||
441 | return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload }) | 441 | return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload }) |
442 | } | 442 | } |
443 | 443 | ||
444 | sendMail (options: EmailPayload) { | 444 | async sendMail (options: EmailPayload) { |
445 | if (!Emailer.isEnabled()) { | 445 | if (!Emailer.isEnabled()) { |
446 | throw new Error('Cannot send mail because SMTP is not configured.') | 446 | throw new Error('Cannot send mail because SMTP is not configured.') |
447 | } | 447 | } |
@@ -450,13 +450,15 @@ class Emailer { | |||
450 | ? options.fromDisplayName | 450 | ? options.fromDisplayName |
451 | : WEBSERVER.HOST | 451 | : WEBSERVER.HOST |
452 | 452 | ||
453 | return this.transporter.sendMail({ | 453 | for (const to of options.to) { |
454 | from: `"${fromDisplayName}" <${CONFIG.SMTP.FROM_ADDRESS}>`, | 454 | await this.transporter.sendMail({ |
455 | replyTo: options.replyTo, | 455 | from: `"${fromDisplayName}" <${CONFIG.SMTP.FROM_ADDRESS}>`, |
456 | to: options.to.join(','), | 456 | replyTo: options.replyTo, |
457 | subject: options.subject, | 457 | to, |
458 | text: options.text | 458 | subject: options.subject, |
459 | }) | 459 | text: options.text |
460 | }) | ||
461 | } | ||
460 | } | 462 | } |
461 | 463 | ||
462 | private dieOnConnectionFailure (err?: Error) { | 464 | private dieOnConnectionFailure (err?: Error) { |