diff --git a/doc/2013-02-TF5/mail.txt b/doc/2013-02-TF5/course-mail.txt similarity index 100% rename from doc/2013-02-TF5/mail.txt rename to doc/2013-02-TF5/course-mail.txt diff --git a/doc/2013-02-TF5/hubs-mail.txt b/doc/2013-02-TF5/hubs-mail.txt new file mode 100644 index 0000000..77756bf --- /dev/null +++ b/doc/2013-02-TF5/hubs-mail.txt @@ -0,0 +1,19 @@ +From: The Tracer FIRE Registration Fairy +To: RCPT +Subject: Tracer FIRE: Correction: Please contact your hub coordinator! + +Apologies for the previous email with a course assignment of "COURSE". You +can safely ignore it. + +Please view this map: + + http://csr.lanl.gov/tf/hubs.png + +If there is a hub in your area, please send email to the provided address +right away so that they can have the right number of chairs, etc. + +The Tracer FIRE FAQ is at + http://csr.lanl.gov/tf/faq.html + +-- +The Tracer Fire Registration Fairy diff --git a/doc/2013-02-TF5/spam.py b/doc/2013-02-TF5/spam.py new file mode 100755 index 0000000..768203f --- /dev/null +++ b/doc/2013-02-TF5/spam.py @@ -0,0 +1,14 @@ +#! /usr/bin/python3 + +import smtplib + +smtpd = smtplib.SMTP("mail.lanl.gov") + +template = open("hubs-mail.txt").read() + +for line in open("assignments.txt"): + course, email = line.strip().split() + + print(email) + msg = template.replace("RCPT", email) + smtpd.sendmail("neale@lanl.gov", [email], msg)