Skip to content

Commit b54d7df

Browse files
authored
fix(firestore-send-email): 'replyTo' no longer required (#2293)
1 parent 50bcdfc commit b54d7df

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

firestore-send-email/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
feat: add support for OAuth2 authentication
44

5+
fix: default replyTo issue introduced in 0.1.35
6+
57
## Version 0.1.36
68

79
feat - move to Node.js 20 runtimes

firestore-send-email/functions/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,15 @@ async function sendWithSendGrid(payload: QueuePayload) {
269269
}));
270270
};
271271

272+
const replyTo = { email: payload.replyTo || config.defaultReplyTo };
273+
272274
// Build the message object for SendGrid
273275
const msg: sgMail.MailDataRequired = {
274276
to: formatEmails(payload.to),
275277
cc: formatEmails(payload.cc),
276278
bcc: formatEmails(payload.bcc),
277279
from: { email: payload.from || config.defaultFrom },
278-
replyTo: { email: payload.replyTo || config.defaultReplyTo },
280+
replyTo: replyTo.email ? replyTo : undefined,
279281
subject: payload.message?.subject,
280282
text:
281283
typeof payload.message?.text === "string"

0 commit comments

Comments
 (0)