Skip to content

Commit f0ae3f8

Browse files
author
Jesson Soto Ventura
committed
Realized subject was hardcoded
1 parent 13a14a8 commit f0ae3f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

api/API/files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ def removeFiles(username):
2424

2525

2626

27-
def create_message(username_email, body):
27+
def create_message(subject, recipients, body):
2828
'''
2929
Parameters:
3030
username_email(s) - Emails of the recipients
3131
body - The body of the email
3232
'''
33-
msg = Message("Subject",
33+
msg = Message(subject,
3434
sender=app.config['MAIL_USERNAME'],
35-
recipients=[username_email]) #create a message instance
35+
recipients=[recipients]) #create a message instance
3636
msg.html = body
3737
return msg

api/chair/awardLetters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def awardLetters_generate(username,pID):
8181
body = body.replace("@@Stipend@@",stipend)
8282
email_address = "%[email protected]" % (username)
8383
try:
84-
acceptance_email = create_message(email_address , body)
84+
acceptance_email = create_message(subject, email_address , body)
8585
mail.send(acceptance_email)
8686
except Exception as e:
8787
return {"mail_to": "Failed to send email to: %s" % (email_address)}

0 commit comments

Comments
 (0)