Skip to content

Commit 3b19046

Browse files
authored
configurable outgoing mailbox (sqlchat#149)
* configurable outgoing mailbox * set the outgoing mail `noreply@sqlchat.ai` as the default if not specified anything
1 parent f2da285 commit 3b19046

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

process.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ declare namespace NodeJS {
3333
GOOGLE_CLIENT_SECRET: string;
3434
// Optional. NextAuth.js email server.
3535
// This can't be tested locally. Must be deployed to the web to send mail.
36+
// https://next-auth.js.org/providers/email
3637
EMAIL_SERVER: string;
38+
EMAIL_FROM: string;
3739
// Optional. Stripe publishable key.
3840
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: string;
3941
// Optional. Stripe API key.

src/pages/api/auth/[...nextauth].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const authOptions: NextAuthOptions = {
1818
? [
1919
EmailProvider({
2020
server: process.env.EMAIL_SERVER,
21-
from: "noreply@sqlchat.ai",
21+
from: process.env.EMAIL_FROM || "noreply@sqlchat.ai",
2222
// maxAge: 24 * 60 * 60, // How long email links are valid for (default 24h)
2323
}),
2424
GoogleProvider({

0 commit comments

Comments
 (0)