feat: update email configuration to use environment variables for credentials
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 4m1s
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 4m1s
This commit is contained in:
@@ -147,9 +147,9 @@ def send_reset_password_email(to_email: str, token: str) -> None:
|
||||
if os.environ.get('DB_ENV') == 'e2e':
|
||||
return
|
||||
Mail(current_app).send(msg)
|
||||
print(f"[EMAIL to {to_email}] Reset password: {reset_url}")
|
||||
except Exception as e:
|
||||
print(f"Failed to send email to {to_email}. Reset link: {reset_url}. exception: {e}")
|
||||
current_app.logger.info("Password reset email sent")
|
||||
except Exception:
|
||||
current_app.logger.exception("Failed to send password reset email")
|
||||
|
||||
|
||||
def send_pin_setup_email(to_email: str, code: str) -> None:
|
||||
@@ -259,4 +259,4 @@ def send_digest_email(to_email: str, items: list, unsubscribe_token: str) -> Non
|
||||
Mail(current_app).send(msg)
|
||||
print(f"[EMAIL to {to_email}] Daily digest sent ({len(items)} items)")
|
||||
except Exception:
|
||||
print(f"Failed to send digest email to {to_email}")
|
||||
print(f"Failed to send digest email to {to_email}")
|
||||
|
||||
Reference in New Issue
Block a user