Resolve build errors

This commit is contained in:
NeilClack
2026-07-17 11:51:14 -05:00
parent bcd216bd56
commit fd630ff714
4 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -9,9 +9,9 @@
*
*/
import { Resend } from 'resend';
import { RESEND_API_KEY, EMAIL_FROM, RESEND_TEMPLATE_ID } from '$env/static/private';
import { env } from '$env/dynamic/private';
export const resend = new Resend(RESEND_API_KEY);
export const resend = new Resend(env.RESEND_API_KEY);
/**
* Send a transactional email using a Resend-hosted template.
@@ -39,11 +39,11 @@ export async function sendMail(options: {
const { to, subject, templateId, data } = options;
const result = await resend.emails.send({
from: EMAIL_FROM,
from: env.EMAIL_FROM,
to: [to],
subject: subject ?? 'Template Email',
template: {
id: templateId ?? RESEND_TEMPLATE_ID,
id: templateId ?? env.RESEND_TEMPLATE_ID,
variables: data ?? {}
}
});