Email Configuration Test
If you're reading this, your email configuration is working correctly!
Server: smtp.gmail.com
Port: 587
TLS: Enabled
โ Email system is operational
""" Email Test Script - Test SMTP connection and email sending Run this to verify email configuration is working """ from flask import Flask from flask_mail import Mail, Message app = Flask(__name__) # Email Configuration app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True app.config['MAIL_USERNAME'] = 'abaayampics@gmail.com' app.config['MAIL_PASSWORD'] = 'pewdqqduxaadcmrp' app.config['MAIL_DEFAULT_SENDER'] = 'abaayampics@gmail.com' mail = Mail(app) def test_email_connection(): """Test SMTP connection""" print("=" * 60) print(" EMAIL CONNECTION TEST") print("=" * 60) with app.app_context(): try: # Test connection with mail.connect() as conn: print("โ SMTP connection successful!") print(f" Server: {app.config['MAIL_SERVER']}") print(f" Port: {app.config['MAIL_PORT']}") print(f" Username: {app.config['MAIL_USERNAME']}") return True except Exception as e: print(f"โ SMTP connection failed!") print(f" Error: {str(e)}") return False def send_test_email(recipient_email): """Send a test email""" print("\n" + "=" * 60) print(" SENDING TEST EMAIL") print("=" * 60) with app.app_context(): try: msg = Message( subject='NeuroSight - Test Email', recipients=[recipient_email] ) msg.html = """
If you're reading this, your email configuration is working correctly!
Server: smtp.gmail.com
Port: 587
TLS: Enabled
โ Email system is operational