Use the GitHub repository to get the entire code: https://github.com/firebase/functions-samples/blob/master/quickstarts/email-users
* TODO(DEVELOPER): Paste the initialization snippet from: Firebase Console > Overview > Add Firebase to your web app. *
*********************************************************************************************************************** -->
<script src="https://www.gstatic.com/firebasejs/3.7.3/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "your apiKey",
authDomain: "authDomain.firebaseapp.com",
databaseURL: "https://databaseURL.firebaseio.com",
storageBucket: "storageBucket.appspot.com",
messagingSenderId: "messagingID"
};
firebase.initializeApp(config);
</script>
Set the gmail.email and gmail.password Google Cloud environment variables to match the email and password of the Gmail account used to send emails. For this open the command prompt or terminal and type the following Firebase CLI command:
firebase functions:config:set gmail.email="[email protected]" gmail.password="secretpassword"