mirror of
https://github.com/detleph/server.git
synced 2026-09-04 00:26:03 +02:00
Do some wacky stuff so that mails actually have a chance of working on our server
This commit is contained in:
+2
-1
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user