Skip to content

Commit

Permalink
chore(notification): warn user of improper sms and email config (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
vp-regular committed Sep 24, 2020
1 parent 9f470f0 commit ab61a98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/notification/sms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import {Config} from '../config';
import Mail from 'nodemailer/lib/mailer';
import nodemailer from 'nodemailer';

if (Config.notifications.phone.number && !Config.notifications.email.username) {
Logger.warn('✖ in order to recieve sms alerts, email notifications must also be configured');
}

const [email, phone] = [Config.notifications.email, Config.notifications.phone];

const transporter = nodemailer.createTransport({
Expand Down

0 comments on commit ab61a98

Please sign in to comment.