Commits

Donald Stufft  committed 63c5fff

Log what messages have been sent

  • Participants
  • Parent commits 0a27c20

Comments (0)

Files changed (1)

File tools/email_renamed_users.py

         user_packages = users.setdefault(role["user_name"], [])
         user_packages.append((old, new))
 
+sent = []
+
 # Email each user
 server = smtplib.SMTP(config.mailhost)
 for username, packages in users.iteritems():
     msg["To"] = user["email"]
 
     server.sendmail("donald@python.org", [user["email"]], msg.as_string())
+    sent.append(("donald@python.org", [user["email"]], msg.as_string()))
 server.quit()
+
+with open("sent.pkl", "w") as pkl:
+    pickle.dump(sent, pkl)