feat: Implement replyTo for contact form emails and refine success/error message layout.

This commit is contained in:
2026-02-06 18:24:58 +01:00
parent d027fbeac2
commit 21a7b0ade2
3 changed files with 40 additions and 28 deletions

View File

@@ -27,16 +27,18 @@ function getTransporter() {
interface SendEmailOptions {
to?: string | string[];
replyTo?: string;
subject: string;
html: string;
}
export async function sendEmail({ to, subject, html }: SendEmailOptions) {
export async function sendEmail({ to, replyTo, subject, html }: SendEmailOptions) {
const recipients = to || config.mail.recipients;
const mailOptions = {
from: config.mail.from,
to: recipients,
replyTo,
subject,
html,
};