From adb79bb89b4766fc77f99e1be7dd5de90037f9e4 Mon Sep 17 00:00:00 2001 From: RISHI SINGHAL Date: Fri, 17 Nov 2023 17:22:46 -0500 Subject: [PATCH] Added new email, resolved key error while sharing email --- application.py | 11 ++++++----- templates/layout.html | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/application.py b/application.py index 98546fbb..f5468bf4 100644 --- a/application.py +++ b/application.py @@ -410,18 +410,19 @@ def send_email(): email = session.get('email') data = list( mongo.db.calories.find({'email': email}, - {'date', 'email', 'calories', 'burnout'})) - table = [['Date', 'Email ID', 'Calories', 'Burnout']] + {'date', 'email', 'calories'})) + print(data) + table = [['Date', 'Email ID', 'Calories']] for a in data: - tmp = [a['date'], a['email'], a['calories'], a['burnout']] + tmp = [a['date'], a['email'], a['calories']] table.append(tmp) friend_email = str(request.form.get('share')).strip() friend_email = str(friend_email).split(',') server = smtplib.SMTP_SSL("smtp.gmail.com", 465) #Storing sender's email address and password - sender_email = "calorie.app.server@gmail.com" - sender_password = "Temp@1234" + sender_email = "calorieapp508@gmail.com" + sender_password = "xsba mgzy rnkr wkvp" #Logging in with sender details server.login(sender_email, sender_password) diff --git a/templates/layout.html b/templates/layout.html index 8f66a358..8b4f878f 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -134,12 +134,12 @@
Newsletter
- + > -->