I want to use Firebase+Sendgrid in order to send e-mail after user registers on my website. The flow is simple:
Using Firebase send email extension, on every account creation, I'm adding new document to users collection.
setDoc(newUserRef, {
to: user.email,
message: {
subject: "Hello!",
text: "test",
html: "Test <b>Test</b> <i>Test</i>",
},
});
This works as intended, since this document is being added to the collection.
However, when i check firestore object, delivery object has
state: ERROR,
error: Error: Invalid login: 535 Authentication failed: Bad username / password}
At sendgrids end, I've created API Key, verified sender email, and used that api key while installing "trigger email" firebase extension.
I've set trigger email extension like this:
SMTP Connection URI: smtps://apikey@smtp.sendgrid.net:465
SMTP password (Optional): apikey
What am i doing wrong?