Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,6 +63,9 @@ def send_email(to_email, subject, body):
|
|
| 63 |
|
| 64 |
logging.info(f"Email sent to {to_email}")
|
| 65 |
return True
|
|
|
|
|
|
|
|
|
|
| 66 |
except Exception as e:
|
| 67 |
logging.error(f"Email error: {e}")
|
| 68 |
raise Exception(f"Failed to send email: {str(e)}")
|
|
|
|
| 63 |
|
| 64 |
logging.info(f"Email sent to {to_email}")
|
| 65 |
return True
|
| 66 |
+
except smtplib.SMTPAuthenticationError as auth_error:
|
| 67 |
+
logging.error(f"SMTP Authentication Error: {auth_error}")
|
| 68 |
+
raise Exception(f"Failed to send email: Invalid credentials or app-specific password required.")
|
| 69 |
except Exception as e:
|
| 70 |
logging.error(f"Email error: {e}")
|
| 71 |
raise Exception(f"Failed to send email: {str(e)}")
|