Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -270,7 +270,7 @@ def send_email_with_attachment(recipient_email, subject, body, attachment_path):
|
|
270 |
|
271 |
# Send the email
|
272 |
try:
|
273 |
-
with smtplib.SMTP_SSL("smtp.gmail.com",
|
274 |
server.login(sender_email, sender_password)
|
275 |
server.sendmail(sender_email, recipient_email, msg)
|
276 |
print("Email sent successfully")
|
|
|
270 |
|
271 |
# Send the email
|
272 |
try:
|
273 |
+
with smtplib.SMTP_SSL("smtp.gmail.com", 1130, context=context) as server:
|
274 |
server.login(sender_email, sender_password)
|
275 |
server.sendmail(sender_email, recipient_email, msg)
|
276 |
print("Email sent successfully")
|