Skip to content

Commit

Permalink
beautify email, summarize recent week's +ve -ve calories
Browse files Browse the repository at this point in the history
  • Loading branch information
ananya173147 committed Nov 25, 2023
1 parent 4b041bb commit 7cabd2a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'}))
Expand All @@ -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 = "[email protected]"
sender_password = c.email_password
Expand Down

0 comments on commit 7cabd2a

Please sign in to comment.