Skip to content Skip to sidebar Skip to footer

Sending Email To Users Without A Risk

I need to send only special Users an Email. That is not a big amount. The Website must send 6 E-Mails a week. I found many solutions. I found this simple solution: https://medium

Solution 1:

With this solution you are using firebase functions. You most certainly want to set some environmental variables to protect some sensitives data like your gmail password.

You can do this in firebase: go check their documentation right here : https://firebase.google.com/docs/functions/config-env

The doc is going to help you set something like :

{"mailer":{"mail":"YOUR GMAIL ADRESS","password":"YOUR GMAIL PASSWORD"}}

So instead of you password in plain text you'll have this in your code :

'password': `${functions.config().mailer.password}`

Much safer right ?

Solution 2:

The web is not open source. If you run a script in the browser then yes, the user can read the code. The example you link, however, runs on the server in response to HTTP(S) requests, and as such is not readable by a visitor.

Post a Comment for "Sending Email To Users Without A Risk"