1

I am developing and android app that uses google Firebase as an authentication provider.I searched out a lot but can not find appropriate answer.I want to send custom Welcome email to user when he/she sign up for the first time.Like the email contain simple "Welcome to Our service Hope you would enjoy our service etc. Any One have any idea would be appreciated and thank in advanced. My question is not about how to send the email from phone using intent service but i want to send the email in background without opening any email sending dialog just like email service from amazon that contain info about their service or products.i just want to send email once when the user sign up in firebase for the first time.

Wisal
  • 153
  • 2
  • 10
  • Doesnt really matter if its PHP, Firebase, Parse-Server....if the registration is successful..... Possible duplicate of [Send Email Intent](https://stackoverflow.com/questions/8701634/send-email-intent) – letsCode Jul 28 '17 at 16:03
  • but sir i dont want to open the email sending dialog i want to send email in the background when the user sign up for the first time. – Wisal Jul 28 '17 at 16:07

2 Answers2

4

You need to use Firebase Cloud Function !

This sample will help you.

With Firebase Cloud Function you can add a trigger on the user account creation and send him a welcome email.

Other sample here.

Pipiks
  • 2,018
  • 12
  • 27
  • But sir i have no idea how to use cloud functions any video tutorial.also i have no idea of Node.js – Wisal Jul 29 '17 at 09:46
  • Just follow the tutorial... https://firebase.google.com/docs/functions/get-started We can not do all the work for you. You have no server to buy, all what you need is on Firebase Dashboard. – Pipiks Jul 29 '17 at 09:54
2

you can use NodeJs with nodemailer link and check this tutorial or a little trick if you will not use the reset password option, go to firebase console> authentication > templates, for the email verification you can not change the template but for the password reset you can change it with the body you wants. After your user sign in use auth.sendPasswordResetEmail(email) to send the email, nothing will happens to the account and you still have access on it.

Oussema Aroua
  • 5,225
  • 1
  • 24
  • 44
  • i have no experience of Node.js...Without this two option is there any other portion...because if user forget the password then he would not be able to reset his password. – Wisal Jul 28 '17 at 17:16
  • you can do PHP and go that route if you dont want to do node. @mtg but you want to make sure everything is secure. – letsCode Jul 28 '17 at 18:03