PrincetonUSG/USG-srv-dev — pull request #8 by bnprks (2014-04-30 02:54:13+00:00)
Title: Fixed up the email system

Now, instead of sending emails through an unsecured endpoint on an outside website, send mail through Princeton's own smtp server. Note that this requires setting up two environment variables to contain the netid and password that will be used to log in and send email. Other options would certainly be possible, but for obvious reasons I didn't want to put a plain-text password in the github source code.

I wasn't sure what value to return, so I used the default return from the smtp send, which is a dict containing any addresses that were rejected by the server. It seems like the return value is never used anyhow, so it's probably not a big deal.