configurable outgoing mailbox (#149)

* configurable outgoing mailbox

* set the outgoing mail `noreply@sqlchat.ai` as the default if not specified anything
This commit is contained in:
Shenle Lu
2024-02-07 11:16:45 +08:00
committed by GitHub
parent f2da2855c3
commit 3b19046e1e
2 changed files with 3 additions and 1 deletions

2
process.d.ts vendored
View File

@ -33,7 +33,9 @@ declare namespace NodeJS {
GOOGLE_CLIENT_SECRET: string;
// Optional. NextAuth.js email server.
// This can't be tested locally. Must be deployed to the web to send mail.
// https://next-auth.js.org/providers/email
EMAIL_SERVER: string;
EMAIL_FROM: string;
// Optional. Stripe publishable key.
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: string;
// Optional. Stripe API key.

View File

@ -18,7 +18,7 @@ export const authOptions: NextAuthOptions = {
? [
EmailProvider({
server: process.env.EMAIL_SERVER,
from: "noreply@sqlchat.ai",
from: process.env.EMAIL_FROM || "noreply@sqlchat.ai",
// maxAge: 24 * 60 * 60, // How long email links are valid for (default 24h)
}),
GoogleProvider({