Do some wacky stuff so that mails actually have a chance of working on our server

This commit is contained in:
Stefan-5422
2022-05-30 20:58:40 +02:00
parent 6f730d1214
commit 04c3bc8f87
+2 -1
View File
@@ -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 };