mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-08 20:08:36 +02:00
Add MAIL_FROM env variable (#949)
Co-authored-by: Roman Tyshyk <roman.tyshyk@711media.de>
This commit is contained in:
parent
44905d36e5
commit
621967d2b6
@ -38,6 +38,7 @@ from danswer.configs.app_configs import SMTP_PASS
|
||||
from danswer.configs.app_configs import SMTP_PORT
|
||||
from danswer.configs.app_configs import SMTP_SERVER
|
||||
from danswer.configs.app_configs import SMTP_USER
|
||||
from danswer.configs.app_configs import MAIL_FROM
|
||||
from danswer.configs.app_configs import VALID_EMAIL_DOMAINS
|
||||
from danswer.configs.app_configs import WEB_DOMAIN
|
||||
from danswer.configs.constants import AuthType
|
||||
@ -111,6 +112,7 @@ def send_user_verification_email(user_email: str, token: str) -> None:
|
||||
msg = MIMEMultipart()
|
||||
msg["Subject"] = "Danswer Email Verification"
|
||||
msg["To"] = user_email
|
||||
msg["From"] = MAIL_FROM
|
||||
|
||||
link = f"{WEB_DOMAIN}/auth/verify-email?token={token}"
|
||||
|
||||
|
@ -81,6 +81,7 @@ SMTP_SERVER = os.environ.get("SMTP_SERVER") or "smtp.gmail.com"
|
||||
SMTP_PORT = int(os.environ.get("SMTP_PORT") or "587")
|
||||
SMTP_USER = os.environ.get("SMTP_USER", "your-email@gmail.com")
|
||||
SMTP_PASS = os.environ.get("SMTP_PASS", "your-gmail-password")
|
||||
MAIL_FROM = os.environ.get("EMAIL_FROM", SMTP_USER)
|
||||
|
||||
|
||||
#####
|
||||
|
@ -27,6 +27,7 @@ services:
|
||||
- SMTP_PORT=${SMTP_PORT:-587} # For sending verification emails, if unspecified then defaults to '587'
|
||||
- SMTP_USER=${SMTP_USER:-}
|
||||
- SMTP_PASS=${SMTP_PASS:-}
|
||||
- MAIL_FROM=${MAIL_FROM:-}
|
||||
# Gen AI Settings
|
||||
- GEN_AI_MODEL_PROVIDER=${GEN_AI_MODEL_PROVIDER:-openai}
|
||||
- GEN_AI_MODEL_VERSION=${GEN_AI_MODEL_VERSION:-gpt-3.5-turbo}
|
||||
|
@ -47,6 +47,8 @@ SECRET=
|
||||
# The below are only needed if you aren't using gmail as your SMTP
|
||||
#SMTP_SERVER=
|
||||
#SMTP_PORT=
|
||||
# when missing SMTP_USER used instead
|
||||
#MAIL_FROM=
|
||||
|
||||
# OpenID Connect (OIDC)
|
||||
#OPENID_CONFIG_URL=
|
||||
|
@ -11,6 +11,7 @@ data:
|
||||
SMTP_PORT: "" # For sending verification emails, if unspecified then defaults to '587'
|
||||
SMTP_USER: "" # 'your-email@company.com'
|
||||
SMTP_PASS: "" # 'your-gmail-password'
|
||||
MAIL_FROM: "" # 'your-email@company.com' SMTP_USER missing used instead
|
||||
# Gen AI Settings
|
||||
GEN_AI_MODEL_PROVIDER: "openai"
|
||||
GEN_AI_MODEL_VERSION: "gpt-3.5-turbo" # Use GPT-4 if you have it
|
||||
|
Loading…
x
Reference in New Issue
Block a user