feat: add CMS inquiries and group bookings
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
import { getMailFrom, getMailTransport } from "./transport";
|
||||
|
||||
export async function sendEmail(to: string, template: { subject: string; html: string }) {
|
||||
export async function sendEmail(
|
||||
to: string,
|
||||
template: { subject: string; html: string },
|
||||
options: { replyTo?: string } = {},
|
||||
) {
|
||||
const transport = getMailTransport();
|
||||
await transport.sendMail({ from: getMailFrom(), to, subject: template.subject, html: template.html });
|
||||
await transport.sendMail({
|
||||
from: getMailFrom(),
|
||||
to,
|
||||
subject: template.subject,
|
||||
html: template.html,
|
||||
...(options.replyTo ? { replyTo: options.replyTo } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user