From 7cabd2a1ffb7bc1f4a561ac7b482310396d986a2 Mon Sep 17 00:00:00 2001 From: ananya173147 Date: Fri, 24 Nov 2023 20:36:22 -0500 Subject: [PATCH] beautify email, summarize recent week's +ve -ve calories --- application.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/application.py b/application.py index fa5fde69..27772e14 100644 --- a/application.py +++ b/application.py @@ -502,12 +502,12 @@ def refresh(): @app.route("/send_email", methods=['GET', 'POST']) def send_email(): - # ############################ - # send_email() function shares Calorie History with friend's email - # route "/send_email" will redirect to send_email() function which redirects to friends.html page. - # Input: Email - # Output: Calorie History Received on specified email - # ########################## + ''' + send_email() function shares Calorie History with friend's email + route "/send_email" will redirect to send_email() function which redirects to friends.html page. + Input: Email + Output: Latest Week Calorie History received on specified email + ''' # ##########################''' email = session.get('email') data = list(mongo.db.calories.find({'email': email}, {'date', 'email', 'calories'})) workout_data = list(mongo.db.workout.find({'email': email}, {'date', 'email', 'burnout'})) @@ -530,6 +530,7 @@ def send_email(): 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 = "calorieapp508@gmail.com" sender_password = c.email_password