
Correo electrónico activador

Made by Firebase
Redacta y envía correos electrónicos basados en el contenido de un documento escrito en una colección específica de Cloud Firestore.
Cómo funciona esta extensión
Use this extension to render and send emails that contain the information from documents added to a specified Cloud Firestore collection.
Adding a document triggers this extension to send an email built from the document's fields. The document's top-level fields specify the email sender and recipients, including
to
,
cc
, and
bcc
options (each supporting UIDs). The document's
message
field specifies the other email elements, like subject line and email body (either plaintext or HTML)
Here's a basic example document write that would trigger this extension:
admin.firestore().collection('mail').add({
to: 'someone@example.com',
message: {
subject: 'Hello from Firebase!',
html: 'This is an <code>HTML</code> email body.',
},
})
You can also optionally configure this extension to render emails using Handlebar templates. Each template is a document stored in a Cloud Firestore collection.
When you configure this extension, you'll need to supply your SMTP credentials for mail delivery . Note that this extension is for use with bulk email service providers, like SendGrid, Mailgun, etc.
Additional setup
Before installing this extension, make sure that you've set up a Cloud Firestore database in your Firebase project.
Billing
To install an extension, your project must be on the Blaze (pay as you go) plan
- You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used).
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s no-cost tier:
- Cloud Firestore
- Cloud Functions (Node.js 10+ runtime. See FAQs )
Usage of this extension also requires you to have SMTP credentials for mail delivery. You are responsible for any associated costs with your usage of your SMTP provider.
Cómo instalar esta extensión
Usa Firebase console
Puedes usar Firebase console para instalar y administrar las extensiones.
Instala con consoleUsa Firebase CLI
También puedes usar Firebase CLI para instalar y administrar las extensiones.
Paso 1: Ejecuta el siguiente comando npm para instalar la CLI o actualizarla a la versión más reciente.
npm install -g firebase-tools¿No funciona? Consulta la referencia de Firebase CLI o cambia tus permisos de npm .
Paso 2: Configura un nuevo directorio de proyecto de Firebase o navega a uno existente
Paso 3: Agrega esta extensión al manifiesto de tu extensión ejecutando
firebase ext:install firebase/firestore-send-email --local --project=projectId_or_alias
Step 4 (Optional): Test this extension locally with the Firebase Emulator Suite
firebase emulators:start
Paso 5: Implementa las extensiones en el manifiesto de tu proyecto
firebase deploy --only extensions --project=projectId_or_alias