diff --git a/server/emails/templates/ConfirmUpdateEmail.tsx b/server/emails/templates/ConfirmUpdateEmail.tsx new file mode 100644 index 0000000000..204cd57a3b --- /dev/null +++ b/server/emails/templates/ConfirmUpdateEmail.tsx @@ -0,0 +1,67 @@ +import * as React from "react"; +import env from "@server/env"; +import BaseEmail, { EmailMessageCategory, EmailProps } from "./BaseEmail"; +import Body from "./components/Body"; +import Button from "./components/Button"; +import EmailTemplate from "./components/EmailLayout"; +import EmptySpace from "./components/EmptySpace"; +import Footer from "./components/Footer"; +import Header from "./components/Header"; +import Heading from "./components/Heading"; + +type Props = EmailProps & { + token: string; +}; + +/** + * Email sent to a user when they request to change their email. + */ +export default class ConfirmUpdateEmail extends BaseEmail { + protected get category() { + return EmailMessageCategory.Authentication; + } + + protected subject() { + return `Your email update request`; + } + + protected preview() { + return `Here’s your email change confirmation.`; + } + + protected renderAsText({ token }: Props): string { + return ` +You requested to update your ${env.APP_NAME} account email. Please +follow the link below to confirm the change. + + ${this.updateLink(token)} + + `; + } + + protected render({ token }: Props) { + return ( + +
+ + + Your email update request +

+ You requested to update your {env.APP_NAME} account email. Please + click below to confirm the change. +

+ +

+ +

+ + +