So, it's the beginning of the semester at my university, and, as a freshman, I have to take some pretty bs classes. One of these classes is called "University Experience". In UE, ~40% of my grade is divided more or less evenly amongst the following three items:
* showing up to class
* joining an organization
* emailing the instructor once a week
That's a fairly bs class, I pretty much already have 13% of my grade, just by joining orgs. However, that third item, emailing the instructor, is interesting. It can be of any length, however simply sending "Hi, checking in to get my points" won't work. The instructor never said anything about not being allowed to use a script to send email every week.
That got me thinking, I can use a python script to get that 13% of my grade. So I did.
Here's the script, edited to remove email addresses: script
There's code in it that allows me to send from more than one person. Why do I have that? Because, when I was talking to others about this, and mentioned that I was going to set up a script to send the email for me, they expressed desire for me to set one up for them as well.
As it stands, the code goes through a list of names and email addresses, then pulls up a text file which has an email written by them that will be sent once a week. After sending the email, it will wait a random interval between one minute and one hour. I do this so as to keep the fact that this is automated discrete. I also randomly choose from the list of names not yet sent from, so as to not have every week be in the exact same order.
All that was left to do was set up a crontab to call the script every saturday at 9 am or so. Which I haven't done yet, because I'll wait until friday to set that one up, I want at least 5 names in the list before I have it set up to be called.