-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
trying to send email inside Promise.all using code:
Promise.all(newResult)
.then((resultsArray) => {
let client = new SparkPost(process.env.EMAIL_SMTP_KEY);
let emailDetails = {
content: {
from: "",
subject: "",
html: mailBody,
},
recipients: [{ address: "" }],
};
client.transmissions.send(emailDetails, (err, data) => {
if (err) {
console.log("Whoops! Something went wrong");
console.log(err);
} else {
console.log("Congrats you can use our client library!");
console.log(data);
}
});
})
Metadata
Metadata
Assignees
Labels
No labels