openpulsesec_web/app/__init__.py
Cipher Vance 15628dc4f3 refactor: Remove hardcoded email and improve environment variable handling
- Removed hardcoded email address `hello@ciphervance.com` and replaced it with `SENDER_EMAIL` from environment variables.
- Added `python-dotenv` to load environment variables from `.env` file for better configuration management.
- Removed redundant logging setup and debug statements for cleaner code.
- Simplified the `send_email` function by removing unnecessary logging and debug output.
- Ensured consistent use of environment variables for SMTP settings and recipient email.

This change improves maintainability and security by avoiding hardcoded values and centralizing configuration.
2025-07-20 10:10:04 -05:00

14 lines
No EOL
258 B
Python

from flask import Flask
from dotenv import load_dotenv
import os
load_dotenv()
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')
from .routes import main
app.register_blueprint(main)
return app