Skip to content

Email not sent. No errors #259

@shauryabhatnagar

Description

@shauryabhatnagar

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions