Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email not sent. No errors #259

Open
shauryabhatnagar opened this issue Jan 20, 2022 · 0 comments
Open

Email not sent. No errors #259

shauryabhatnagar opened this issue Jan 20, 2022 · 0 comments

Comments

@shauryabhatnagar
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant