emails
This commit is contained in:
@@ -26,7 +26,7 @@ export const bootstrapHandler: Handler = async function (ctx) {
|
||||
|
||||
await sendMail({
|
||||
template: 'VerifyAdmin',
|
||||
subject: 'Verify your Officer account',
|
||||
subject: 'Verify your officer.dev account',
|
||||
to: email,
|
||||
data: { name: email, url },
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ export const forgotPasswordHandler: Handler = async function (ctx) {
|
||||
|
||||
await sendMail({
|
||||
template: 'ForgotPassword',
|
||||
subject: 'Reset your Officer password',
|
||||
subject: 'Reset your officer.dev password',
|
||||
to: dbUser.email,
|
||||
data: { email: dbUser.email, url },
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ export const resendVerificationHandler: Handler = async function (ctx) {
|
||||
|
||||
await sendMail({
|
||||
template: 'VerifyAdmin',
|
||||
subject: 'Verify your Officer account',
|
||||
subject: 'Verify your officer.dev account',
|
||||
to: user.email,
|
||||
data: { name: user.email, url },
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ export const signupHandler: Handler = async function (ctx) {
|
||||
|
||||
await sendMail({
|
||||
template: 'VerifyAdmin',
|
||||
subject: 'Verify your Officer account',
|
||||
subject: 'Verify your officer.dev account',
|
||||
to: dbUser.email,
|
||||
data: { name: dbUser.email, url },
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ smtpRouter.post('/test', async (ctx) => {
|
||||
'Authorization': `Bearer ${body.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ from, to: body.to, subject: 'Officer Test Email', html: testHtml }),
|
||||
body: JSON.stringify({ from, to: body.to, subject: 'officer.dev Test Email', html: testHtml }),
|
||||
});
|
||||
if (!res.ok) {
|
||||
const err = await res.json();
|
||||
@@ -124,7 +124,7 @@ smtpRouter.post('/test', async (ctx) => {
|
||||
|
||||
const url = buildTransportUrl(body);
|
||||
const transport = createTransport(url);
|
||||
await transport.sendMail({ from, to: body.to, subject: 'Officer Test Email', html: testHtml });
|
||||
await transport.sendMail({ from, to: body.to, subject: 'officer.dev Test Email', html: testHtml });
|
||||
return ctx.json({ success: true });
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : 'Unknown error';
|
||||
|
||||
@@ -54,7 +54,7 @@ usersRouter.post('/invite', async (ctx) => {
|
||||
|
||||
await sendMail({
|
||||
template: 'UserInvite',
|
||||
subject: 'You have been invited to Officer',
|
||||
subject: 'You have been invited to officer.dev',
|
||||
to: email,
|
||||
data: { invitedBy: reqUser.name ?? reqUser.email, url },
|
||||
});
|
||||
@@ -81,7 +81,7 @@ usersRouter.post('/:id/resend-invite', async (ctx) => {
|
||||
|
||||
await sendMail({
|
||||
template: 'UserInvite',
|
||||
subject: 'You have been invited to Officer',
|
||||
subject: 'You have been invited to officer.dev',
|
||||
to: target.email,
|
||||
data: { invitedBy: reqUser.name ?? reqUser.email, url },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user