Ver a proveniência

Send mEssage

master
ascendente
cometimento
75333c61dc
2 ficheiros alterados com 24 adições e 26 eliminações
  1. +12
    -13
      index-nota.mjs
  2. +12
    -13
      index-payleter.mjs

+ 12
- 13
index-nota.mjs Ver ficheiro

@@ -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)
})
}

+ 12
- 13
index-payleter.mjs Ver ficheiro

@@ -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)
})
}

Carregando…
Cancelar
Guardar