From c08940ca3ce8ba1002840554482cc2f86b435290 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 21 May 2022 08:36:37 +0100 Subject: [PATCH] feat: Add optional replyTo for email sending --- server/emails/mailer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/emails/mailer.tsx b/server/emails/mailer.tsx index a5309ff63..df53fdf4d 100644 --- a/server/emails/mailer.tsx +++ b/server/emails/mailer.tsx @@ -11,6 +11,7 @@ const useTestEmailService = type SendMailOptions = { to: string; + replyTo?: string; subject: string; previewText?: string; text: string; @@ -70,8 +71,8 @@ export class Mailer { try { Logger.info("email", `Sending email "${data.subject}" to ${data.to}`); const info = await transporter.sendMail({ - from: `Outline <${env.SMTP_FROM_EMAIL}>`, - replyTo: env.SMTP_REPLY_EMAIL ?? env.SMTP_FROM_EMAIL, + from: env.SMTP_FROM_EMAIL, + replyTo: data.replyTo ?? env.SMTP_REPLY_EMAIL ?? env.SMTP_FROM_EMAIL, to: data.to, subject: data.subject, html,