firebase / extensions

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

🐛 [firestore-send-email] The default "From" email is not respected #1938

Closed zjamshidi closed 5 months ago

zjamshidi commented 5 months ago

Describe your configuration

Describe the problem

It doesn't matter if I set the "FROM" field in the document or not, the received emails are always from info@ email. Neither the value in the "FROM" field of the document nor the default FROM email in the configuration is respected.

Screenshot 2024-01-30 at 6 25 36 PM
jauntybrain commented 5 months ago

Hi @zjamshidi,

As per nodemailer documentation, Gmail does not support from address:

Gmail also always sets authenticated username as the From: email address. So if you authenticate as foo@example.com and set bar@example.com as the from: address, then Gmail reverts this and replaces the sender with the authenticated user.

Since this extension uses nodemailer to send emails, unfortunately, it's impossible to specify a custom from address when using Gmail SMTP. We will make sure to update the documentation to reflect this.