From a10f529cf3506bfe3c251aacc7439baabb9439ed Mon Sep 17 00:00:00 2001 From: Ian Webster Date: Sat, 6 Jul 2019 13:21:34 -0700 Subject: [PATCH] Add error message to "Communication with SMS gateway failed" Issue #143 --- lib/config.js | 4 ++-- server/app.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config.js b/lib/config.js index bb14655..19fc19b 100644 --- a/lib/config.js +++ b/lib/config.js @@ -5,7 +5,7 @@ const SENDMAIL_TRANSPORT = { path: '/usr/sbin/sendmail', }; -const EXAMPLE_SMTP_TRANSPORT = { +const SMTP_TRANSPORT = { // This is a Nodemailer transport. It can either be an SMTP server or a // well-known service such as Sengrid, Mailgun, Gmail, etc. // See https://nodemailer.com/transports/ and https://nodemailer.com/smtp/well-known/ @@ -22,7 +22,7 @@ const EXAMPLE_SMTP_TRANSPORT = { }; module.exports = { - transport: SENDMAIL_TRANSPORT, + transport: SMTP_TRANSPORT, mailOptions: { from: '"Jane Doe" ', }, diff --git a/server/app.js b/server/app.js index 2fe145a..c874b0f 100644 --- a/server/app.js +++ b/server/app.js @@ -57,7 +57,7 @@ function textRequestHandler(req, res, number, carrier, region) { if (err) { res.send({ success: false, - message: 'Communication with SMS gateway failed.', + message: `Communication with SMS gateway failed. Did you configure mail transport in lib/config.js? Error message: '${err.message}'`, }); } else { res.send({ success: true });