Answer the question
In order to leave comments, you need to log in
How to send email by trigger in cloud functions?
I got myself a base on firebase, as there is no need for some kind of wide functionality from the back-end, now I’m thinking how best to connect sending emails.
There are 2 chairs ... on one sendgrid, and on the other gmail, which one will you sit on, which client will you put on?:
There is some strange authorization in gmail and it seems to require an account service:
const auth = {
user: [email protected];
password: ...word;
privateKey: ????;
}
Answer the question
In order to leave comments, you need to log in
Firstly, you don’t need to stuff authorization data into the object and into the turnip, for this there is Environment variables in Cloud Functions https://cloud.google.com/functions/docs/env-var
Secondly, you need a service account for Gmail in order to control the access of third-party applications (in this case, this is Firebase). This is actually more convenient than putting your logins and passwords in Environment variables, instead of just a private key.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question