From fa0078ac697d33854a49f4758d496fb5a021621d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 29 Jan 2013 14:38:29 -0700 Subject: [PATCH] more course changes and some spam scripts --- doc/2013-02-TF5/{mail.txt => course-mail.txt} | 0 doc/2013-02-TF5/hubs-mail.txt | 19 +++++++++++++++++++ doc/2013-02-TF5/spam.py | 14 ++++++++++++++ 3 files changed, 33 insertions(+) rename doc/2013-02-TF5/{mail.txt => course-mail.txt} (100%) create mode 100644 doc/2013-02-TF5/hubs-mail.txt create mode 100755 doc/2013-02-TF5/spam.py 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)