forked from utsavll0/calorieApp_server
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beautify email, summarize recent week's +ve -ve calories
- Loading branch information
1 parent
4b041bb
commit 7cabd2a
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = "[email protected]" | ||
sender_password = c.email_password | ||
|