Skip to content

Commit aa4ee10

Browse files
committed
Improve capitalization in emails
1 parent 7cbc6f3 commit aa4ee10

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

app/lib/user.server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ export const sendVerificationEmail = async (user: User) => {
7575
},
7676
],
7777
Subject: `Please verify your email`,
78-
TextPart: `Dear ${user.firstName} ${user.lastName},\n\nto complete your sign up for UnternehmerTUM Certificates, please click on the following link:\n${verificationUrl}\n\nIf you haven't signed up yourself, please ignore or report this email.\n\nThank you!`,
79-
HTMLPart: `<p>Dear ${user.firstName} ${user.lastName},</p><p>to complete your sign up for UnternehmerTUM Certificates, please click on the following link:<br /><a href="${verificationUrl}">${verificationUrl}</a></p><p>If you haven't signed up yourself, please ignore or report this email.</p><p>Thank you!</p>`,
78+
TextPart: `Dear ${user.firstName} ${user.lastName},\n\nTo complete your sign up for UnternehmerTUM Certificates, please click on the following link:\n${verificationUrl}\n\nIf you haven't signed up yourself, please ignore or report this email.\n\nThank you!`,
79+
HTMLPart: `<p>Dear ${user.firstName} ${user.lastName},</p><p>To complete your sign up for UnternehmerTUM Certificates, please click on the following link:<br /><a href="${verificationUrl}">${verificationUrl}</a></p><p>If you haven't signed up yourself, please ignore or report this email.</p><p>Thank you!</p>`,
8080
},
8181
],
8282
})
@@ -103,8 +103,8 @@ export const sendInvitationEmail = async (
103103
// @todo dynamic org name from database
104104
const acceptUrl = `${domain}/user/accept-invite/${invite.id}/${invite.verifyCode}`;
105105

106-
const text = `Dear ${invite.firstName} ${invite.lastName},\n\n${from ? `${from.firstName} ${from.lastName} is inviting you` : "you have been invited"} to become an admiminstrator for the UnternehmerTUM certificates tool.\n\nTo accept the invitation, please click on the following link:\n${acceptUrl}\n\nThank you!`;
107-
const html = `<p>Dear ${invite.firstName} ${invite.lastName},</p><p>${from ? `${from.firstName} ${from.lastName} is inviting you` : "you have been invited"} to become an admiminstrator for the UnternehmerTUM certificates tool.</p><p>To accept the invitation, please click on the following link:<br /><a href="${acceptUrl}">${acceptUrl}</a></p><p>Thank you!</p>`;
106+
const text = `Dear ${invite.firstName} ${invite.lastName},\n\n${from ? `${from.firstName} ${from.lastName} is inviting you` : "You have been invited"} to become an admiminstrator for the UnternehmerTUM certificates tool.\n\nTo accept the invitation, please click on the following link:\n${acceptUrl}\n\nThank you!`;
107+
const html = `<p>Dear ${invite.firstName} ${invite.lastName},</p><p>${from ? `${from.firstName} ${from.lastName} is inviting you` : "You have been invited"} to become an admiminstrator for the UnternehmerTUM certificates tool.</p><p>To accept the invitation, please click on the following link:<br /><a href="${acceptUrl}">${acceptUrl}</a></p><p>Thank you!</p>`;
108108

109109
await mailjet
110110
.post("send", { version: "v3.1" })

app/routes/cert.$certUuid.notify.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ export const action: ActionFunction = async ({ request, params }) => {
8080
: `${domain}/user/login?sign=up&email=${certificate.email}&firstName=${certificate.firstName}&lastName=${certificate.lastName}`;
8181

8282
const mailText = social
83-
? `Dear ${certificate.firstName},\n\nyour certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready for you.\n\n\nDownload your certificate from this link:\n${certUrl}\n\n\nShare your certificate on social media with your personal link:\n1. Sign up to our certificate tool with this email address at the link above\n2. Insert your photo into the social media preview\n3. Share it across your platforms\n\n\nCongratulations!`
84-
: `Dear ${certificate.firstName},\n\nyour certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready and the document attached to this email.\n\nAll the best!`;
83+
? `Dear ${certificate.firstName},\n\nYour certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready for you.\n\n\nDownload your certificate from this link:\n${certUrl}\n\n\nShare your certificate on social media with your personal link:\n1. Sign up to our certificate tool with this email address at the link above\n2. Insert your photo into the social media preview\n3. Share it across your platforms\n\n\nCongratulations!`
84+
: `Dear ${certificate.firstName},\n\nYour certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready and the document attached to this email.\n\nAll the best!`;
8585
const mailHTML = social
86-
? `<p>Dear ${certificate.firstName},</p><p>your certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready for you.</p><p>Download your certificate from this link:<br/><a href="${certUrl}" rel="notrack">${certUrl}</a></p><p>Share your certificate on social media with your personal link:<ol><li><a href="${loginUrl}" rel="notrack">Sign ${participant ? "in" : "up"}</a> to our certificate tool with this email address at the link above</li><li>Insert your photo into the social media preview</li><li>Share it across your platforms</li></ol></p><p>Congratulations!</p><br/>`
87-
: `<p>Dear ${certificate.firstName},</p><p>your certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready and the document attached to this email.</p><p>All the best!</p>`;
86+
? `<p>Dear ${certificate.firstName},</p><p>Your certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready for you.</p><p>Download your certificate from this link:<br/><a href="${certUrl}" rel="notrack">${certUrl}</a></p><p>Share your certificate on social media with your personal link:<ol><li><a href="${loginUrl}" rel="notrack">Sign ${participant ? "in" : "up"}</a> to our certificate tool with this email address at the link above</li><li>Insert your photo into the social media preview</li><li>Share it across your platforms</li></ol></p><p>Congratulations!</p><br/>`
87+
: `<p>Dear ${certificate.firstName},</p><p>Your certificate for ${certificate.batch.program.name}${certificate.batch.name} is ready and the document attached to this email.</p><p>All the best!</p>`;
8888

8989
// @todo sender email, domain and links need to be configurable
9090
// eslint-disable-next-line @typescript-eslint/no-explicit-any

app/routes/user.verify.$userId.$code.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export const loader: LoaderFunction = async ({ params }) => {
3737
}
3838
}
3939

40+
// @todo create a one-time-password for the verification process and start a logged-in user session immediately
41+
4042
// Got here?
4143
throw new Response(null, {
4244
status: 400,

0 commit comments

Comments
 (0)