From 04c3bc8f872f7266232003249b269cc9bf96edf0 Mon Sep 17 00:00:00 2001 From: Stefan-5422 <32109571+Stefan-5422@users.noreply.github.com> Date: Mon, 30 May 2022 20:58:40 +0200 Subject: [PATCH] Do some wacky stuff so that mails actually have a chance of working on our server --- src/lib/mail.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/mail.ts b/src/lib/mail.ts index eda1b55..c55fd8e 100644 --- a/src/lib/mail.ts +++ b/src/lib/mail.ts @@ -66,7 +66,8 @@ const sendMail = async (from: string, to: string, subject: string, text?: string export const verificationMail = async (to: string, eventName: string, verificationLink: string) => { const raw = mjml.getTemplate("emailVerification"); - verificationLink = "https://" + (process.env.DOMAIN ?? "localhost:3000") + "/api/users/verify/" + verificationLink; + verificationLink = + "https://" + ("api." + process.env.DOMAIN ?? "localhost:3000/api") + "/users/verify/" + verificationLink; const message = Handlebars.compile(raw); const data = { eventName, verificationLink };