Skip to content

🐛 [Firestore-send-email] The default replyTo field is not overridden when using GMAIL smtp #2186

Open
@Dan1ell

Description

Configuration

  • Extension name: _ firestore-send-email
  • Extension version: _ firebase/firestore-send-email@0.1.34
  • Configuration:
    _ SMTP connection URI: smtps://xxx@gmail.com@smtp.gmail.com:465
    _ Both the default FROM and default REPLY-TO are set. Mail sending works. Reply to header gets set in received emails.

Problem

Trying to override default Reply To address but it's not working.

Steps to reproduce:

Create a firestore document for use by the extension as follows:

 export const sendEmail = functions.https.onCall((data, context) => {

  const emailAdress = data.to;
  const subject = data.subject;
  const body = data.body;
  const replyTo = data.replyTo;

  try {
    db.collection("mail")
      .add({
        to: emailAdress,
        message: {
          subject: subject,
          html: body,
          replyTo: replyTo
        },
      });
    functions.logger.info("Completed sendEmail for: " + subject);
    return null;
  } catch (error) {
    functions.logger.error("Error within sendEmail: " + error.message);
  }
});
Expected result

The email address sent along with the document appears in the Reply To header of the received email.

Actual result

There are no errors but the default email address from the extension's configuration appears in the email's reply to header instead of the replyTo email address sent along in the document.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions