emails
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user