Skip to content

Commit

Permalink
add testing email
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlzhou committed May 26, 2023
1 parent 92e72ce commit d15fe8b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eAbsentee/admin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,13 @@ def email_reminder(email):
'recently using your eAbsentee.org group codes. ' +
'Please email james@eAbsentee.org with any questions.'
)

def email_testing(email):
yagmail.SMTP(os.environ['GMAIL_SENDER_ADDRESS'], os.environ['GMAIL_SENDER_PASSWORD']).send(
to=email,
subject=f'eAbsentee Daily Check Successful',
contents=f'If you are receiving this email, this means that' +
'eAbsentee is functional and adding to the mySQL database. ' +
'Please visit the website to manually check that it is still online' +
'and email brian@eAbsentee.org with any questions.'
)

0 comments on commit d15fe8b

Please sign in to comment.