refactor: address code review feedback - clean up test imports and add MAIL_PORT validation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-12 00:18:08 +00:00
parent cfe000f030
commit ee96104f66
2 changed files with 5 additions and 3 deletions
+4 -1
View File
@@ -62,7 +62,10 @@ class Config:
DROPBOX_REDIRECT_URI = os.getenv("DROPBOX_REDIRECT_URI", "http://localhost:5000/users/dropbox/callback")
MAIL_HOST = os.getenv("MAIL_HOST", "localhost")
MAIL_PORT = int(os.getenv("MAIL_PORT", "25"))
try:
MAIL_PORT = int(os.getenv("MAIL_PORT", "25"))
except (ValueError, TypeError):
MAIL_PORT = 25
MAIL_USE_TLS = os.getenv("MAIL_USE_TLS", "False") == "True"
MAIL_USE_SSL = os.getenv("MAIL_USE_SSL", "False") == "True"
MAIL_USERNAME = os.getenv("MAIL_USERNAME", "")