简体   繁体   中英

Send Welcome Email iOS Firebase Auth

I currently have an iOS App that uses Firebase with my database.

I am trying to get my users a welcome email after a successful sign up.

Does anyone know how I can make this possible?

Thanks!

Firebase has no built-in API for you to send email directly from the client, as that would attract way too much spam.

The most common approach to do this with Firebase is through the use of Cloud Functions, which are (typically small) Node.js functions that run in an environment managed by Google Cloud, and that are triggered by events happening inside your Firebase project.

Two such triggers that are relevant here:

  1. You can run a Cloud Function in response to a user account being created in Firebase Authentication. For an example of this, see Send a welcome email when a user completes signup .
  2. You can run a Cloud Function in response to a document being written to Cloud Firestore, or a value being written to the Realtime Database. For one example of this, see Send confirmation emails to users subscribing/unsubscribing to a newsletter .

You could use all of these to then send an email through an SMTP server that you have credentials for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM