diff options
Diffstat (limited to 'reminder.py')
-rw-r--r-- | reminder.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/reminder.py b/reminder.py new file mode 100644 index 0000000..5fd0025 --- /dev/null +++ b/reminder.py @@ -0,0 +1,21 @@ +import smtplib +from email.mime.text import MIMEText +from email.utils import formatdate +import sys + +import email_helper +from config import config + +def send_reminder(): + """Sends a reminder email based on the arguments for easy scripting + Usage: python3 reminder.py <subject> <body...> + """ + + name = config["email"]["name"] + user = config["email"]["user"] + subject = "REMINDER: %s" % sys.argv[1] + body = sys.argv[2] if len(sys.argv) > 2 else "" + email_helper.send(user, name, user, subject, body) + +if __name__ == "__main__": + send_reminder() |