Skip to content

Commit

Permalink
Update generate_event_reminders.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymanning authored Jul 18, 2024
1 parent cfb5344 commit be36f0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generate_event_reminders.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def create_event_script(event_name, date_str, content_file, frequency, day_of_we
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(sender_email, os.getenv('GMAIL_PASSWORD'))
password = os.getenv('GMAIL_PASSWORD')
if password is None:
raise ValueError("GMAIL_PASSWORD environment variable not set")
server.login(sender_email, password)
text = msg.as_string()
server.sendmail(sender_email, admin_emails + organizer_emails, text)
server.quit()
Expand Down

0 comments on commit be36f0e

Please sign in to comment.