feat: Add optional replyTo for email sending
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user