I have created an account with sendInBlue and imported nodemailer and nodemailer-sendinblue-transport into my project where I am trying to send a simply confirmation email. The following code is how I have attempted to setup:
const transporter = nodemailer.createTransport(
sendinblueTransport({
auth: {
apiKey: 'key'
}
})
);
The following code is a section of my signup method responsible for sending the confirmation email:
return transporter.sendMail({
to: email,
from: 'person@gmail.com',
subject: 'Signup succeeded!',
html: '<h1>You successfully signed up!</h1>'
});
When I run my program the signup process succeeds but the following error is thrown instead of the email sending:
Error: Key Not Found In Database (failure, 401)
I read that their v2 API might be depreciated but a member of their customer support says they still provide support for nodemailer, what could be the problem? I've also tried sendGrid and Mandrill but the former has a very buggy website that doesn't let me login and the latter requires an active domain to send emails.
Thanks