Skip to content

EmailJS Flows

The API uses EmailJS for transactional emails. These environment variables are required:

  • EMAILJS_SERVICE_ID
  • EMAILJS_PUBLIC_KEY
  • EMAILJS_PRIVATE_KEY
  • EMAILJS_TEMPLATE_REGISTRO_ID
  • EMAILJS_TEMPLATE_OLVIDE_ID
  • EMAILJS_FROM_NAME (optional)

Helper: helpers/EmailRegistro.js

Uses template EMAILJS_TEMPLATE_REGISTRO_ID with the following params:

{
"to_email": "<veterinario email>",
"to_name": "<veterinario nombre>",
"confirm_url": "<FRONTEND_URL>/confirmarcuenta/<token>",
"from_name": "<EMAILJS_FROM_NAME or default>"
}

Helper: helpers/EmailOlvidePassword.js

Uses template EMAILJS_TEMPLATE_OLVIDE_ID with the following params:

{
"to_email": "<veterinario email>",
"to_name": "<veterinario nombre>",
"reset_url": "<FRONTEND_URL>/olvidepassword/<token>",
"from_name": "<EMAILJS_FROM_NAME or default>"
}