firebase / extensions

Source code for official Firebase extensions
https://firebase.google.com/products/extensions
Apache License 2.0
893 stars 383 forks source link

🐛 [firebase/firestore-send-email] Generate message object also when using Handlebars templates #2190

Open lesqui23 opened 1 month ago

lesqui23 commented 1 month ago

This feature request is for extension: _ (storage-resize-images, firestore-send-email, etc)

Feature Request: Add support to generated message object with templates Extension Name: firebase/firestore-send-email

Version: 0.1.34

Description:

Currently, when using the firestore-send-email extension with Handlebars templates, the extension sends the email directly after merging the template and data. However, there is no easy way to access the fully compiled message object (with html, text, and subject) after it is sent to the customer.

This makes it difficult to log or store the final email content for record-keeping, auditing, or debugging purposes. Having access to the final message object would provide greater transparency and control over the email process.

Proposed Solution:

Add a feature where the extension can optionally store the message object (containing the compiled html, text, and subject) before/after sending the email. This would allow developers to log, review, or store the email content as needed.

Use Case:

For businesses that need to maintain a record of every email sent to customers, this feature would allow them to store or review the email content in their database or logs. It would also help in debugging issues related to email content without needing to send the email multiple times.