From a4e8231a3be996873e75851e8b5f1c59c94d7d82 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 9 Aug 2025 17:48:03 +0200 Subject: [PATCH] fixes --- server/utils/email.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/utils/email.ts b/server/utils/email.ts index e6ee952..fe0c9aa 100644 --- a/server/utils/email.ts +++ b/server/utils/email.ts @@ -1,9 +1,14 @@ import nodemailer from 'nodemailer'; import handlebars from 'handlebars'; import { readFileSync } from 'fs'; -import { join } from 'path'; +import { join, dirname } from 'path'; +import { fileURLToPath } from 'url'; import type { SMTPConfig } from '~/utils/types'; +// ES modules compatibility for __dirname +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + export interface EmailData { to: string; subject: string;