Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -300,9 +300,12 @@ def send_email_with_attachment(recipient_email, subject, body, image_data):
|
|
| 300 |
|
| 301 |
# Create SMTP session for sending the mail
|
| 302 |
print(body)
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
|
|
|
|
|
|
|
|
|
| 306 |
print(body)
|
| 307 |
text = msg.as_string()
|
| 308 |
print(body)
|
|
|
|
| 300 |
|
| 301 |
# Create SMTP session for sending the mail
|
| 302 |
print(body)
|
| 303 |
+
with smtplib.SMTP_SSL('smtp.gmail.com', 25) as smtp_server:
|
| 304 |
+
|
| 305 |
+
smtp_server.login(sender, password)
|
| 306 |
+
#server = smtplib.SMTP('smtp.gmail.com', 587)
|
| 307 |
+
#server.starttls()
|
| 308 |
+
#server.login(sender_email, sender_password)
|
| 309 |
print(body)
|
| 310 |
text = msg.as_string()
|
| 311 |
print(body)
|