Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Wilson committed Nov 14, 2019
1 parent a2730ee commit 72b8371
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/email-sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports.sendMessage = async function (receipiants, subjectMessage, message) {

// Email Content
const mailOptions = {
from: '', // Email Name
from: process.env.NODEMAILER_USERNAME, // Email Name
to: receipiants, // People to send to
subject: subjectMessage, // Subject Line
html: message, // Message Body
Expand All @@ -37,9 +37,9 @@ exports.sendMessage = async function (receipiants, subjectMessage, message) {
// Send the email with the email content
transporter.sendMail(mailOptions, (err, info) => {
if (err) {
reject(err);
reject(err); // Send promise.reject if an error occurs
} else {
resolve(info);
resolve(info); // Send promise.resolve if an error occurs
}
});
});
Expand Down

0 comments on commit 72b8371

Please sign in to comment.