Skip to main content

send_email

Sends a transactional HTML email through the Brevo API. The sender is always TMT <[email protected]>.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/send_email

Request

data.to_email
string
required
Recipient email address.
data.to_name
string
required
Recipient display name.
data.subject
string
required
Email subject line.
data.html_send
string
required
Full HTML content of the email body.
{
  "data": {
    "to_email": "[email protected]",
    "to_name": "Juan Pérez",
    "subject": "Tus entradas para el evento",
    "html_send": "<h1>Gracias por tu compra</h1><p>Aquí están tus tickets.</p>"
  }
}

Response

Success:
{
  "message": "enviado",
  "status": 200,
  "data": {
    "valido": true,
    "mensaje": { "messageId": "<brevo-message-id>" }
  }
}
Error:
{
  "message": "No Enviado",
  "status": 400,
  "data": {
    "valido": false,
    "error": {}
  }
}
The Brevo API key is stored as a hardcoded placeholder ('-') in helpers.js. Set it via Firebase Secrets before deployment.

Build docs developers (and LLMs) love