mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-23 12:15:36 +02:00
add no reply var
This commit is contained in:
parent
e89ee4042a
commit
35c6e465e2
3 changed files with 7 additions and 3 deletions
|
@ -10,7 +10,7 @@
|
||||||
"db:studio": "drizzle-kit studio",
|
"db:studio": "drizzle-kit studio",
|
||||||
"build": "next build && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
|
"build": "next build && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
|
||||||
"start": "ENVIRONMENT=prod node dist/server/index.js",
|
"start": "ENVIRONMENT=prod node dist/server/index.js",
|
||||||
"email": "email dev --dir emailTemplates --port 3002"
|
"email": "email dev --dir server/emails/templates --port 3002"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lucia-auth/adapter-drizzle": "1.1.0",
|
"@lucia-auth/adapter-drizzle": "1.1.0",
|
||||||
|
|
|
@ -16,6 +16,11 @@ export async function sendEmail(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!opts.from || !opts.to || !opts.subject) {
|
||||||
|
logger.error("Email missing required fields", opts);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const emailHtml = await render(template);
|
const emailHtml = await render(template);
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
|
@ -26,8 +31,6 @@ export async function sendEmail(
|
||||||
};
|
};
|
||||||
|
|
||||||
await emailClient.sendMail(options);
|
await emailClient.sendMail(options);
|
||||||
|
|
||||||
logger.debug(`Sent email to ${opts.to}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default sendEmail;
|
export default sendEmail;
|
||||||
|
|
|
@ -43,6 +43,7 @@ const environmentSchema = z.object({
|
||||||
.pipe(z.number().optional()),
|
.pipe(z.number().optional()),
|
||||||
EMAIL_SMTP_USER: z.string().optional(),
|
EMAIL_SMTP_USER: z.string().optional(),
|
||||||
EMAIL_SMTP_PASS: z.string().optional(),
|
EMAIL_SMTP_PASS: z.string().optional(),
|
||||||
|
EMAIL_NOREPLY: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const environment = {
|
const environment = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue