0

I've been developing a website using React as the frontend and Firebase as the backend. It's been great so far. The thing is, I now want to be able to make API requests to an email server, and since I need to keep the API key private, there doesn't seem to be a way to do this in React alone (How do I hide API key in create-react-app?).

Is there a way to do this on the Firebase side (it's a big hassle to setup an API just for emailing)?

Note: cloud functions seem like they might do the trick, but I don't have the blaze plan (https://firebase.google.com/pricing).

Sam Liu
  • 157
  • 1
  • 8
  • 1
    You'd need to setup something on a server. That could be in a function, in a custom server somewhere, or you could use an extension: https://firebase.google.com/products/extensions/firestore-send-email – imjared Aug 16 '21 at 01:04

1 Answers1

0

Running custom server-side code on Firebase is only possible on the Blaze plan. There is no simple, secure alternative to send mail directly from the client through Firebase.

This search has some promising results however: https://www.google.com/search?q=send+mail+directly+from+react+app

Also see:

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807