Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Add HTML body to outgoing mail
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed Mar 5, 2019
1 parent 89c37ef commit 84543bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/lib/login/passwordless/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ export async function startPasswordlessLogin(
const user: Accownt.User = await storage.getItem(`user-${userId}`);

const token = await signJWT(user.id, user.email, TEMP_JWT_EXPIRES_IN);
const link = `${ACCOWNT_API_URL}/login/passwordless?jwt=${token}`;
await sendMail({
subject: `${NAME} Passwordless Login`,
text: `${ACCOWNT_API_URL}/login/passwordless?jwt=${token}`,
html: `<a href="${link}">Login to ${NAME}.</a>`,
text: link,
to: user.email
});

Expand Down

0 comments on commit 84543bf

Please sign in to comment.