|
|
|
@@ -36,17 +36,16 @@ function sendReceipt(message) { |
|
|
|
subject: message.subject, |
|
|
|
html: message.content, |
|
|
|
} |
|
|
|
// sgMail |
|
|
|
// .send(msg) |
|
|
|
// .then((response) => { |
|
|
|
// if (response[0].statusCode == 202) { |
|
|
|
// console.log(`Email sent to ${message.email} at ${now}`) |
|
|
|
// } else { |
|
|
|
// console.error(`Failed to send email to ${message.email} at ${now}`) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch((error) => { |
|
|
|
// console.error(error) |
|
|
|
// }) |
|
|
|
console.log(`Email sent to ${message.email} at ${now}`) |
|
|
|
sgMail |
|
|
|
.send(msg) |
|
|
|
.then((response) => { |
|
|
|
if (response[0].statusCode == 202) { |
|
|
|
console.log(`Email sent to ${message.email} at ${now}`) |
|
|
|
} else { |
|
|
|
console.error(`Failed to send email to ${message.email} at ${now}`) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
console.error(error) |
|
|
|
}) |
|
|
|
} |