

Sending Emails Through Python and GMail - carlobundy
http://jmduke.net/post/39159602638/sending-emails-through-python-gmail

======
jc4p
If anyone cares (or doesn't want to waste a few hours learning) about how to
do the flip side, here's how to read Gmail using Python:
[https://github.com/jc4p/google-voice-twitter-
messenger/blob/...](https://github.com/jc4p/google-voice-twitter-
messenger/blob/master/email_checker.py#L8)

------
lh7777
I've been using script similar to this for years:
[http://kutuma.blogspot.com/2007/08/sending-emails-via-
gmail-...](http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-
python.html)

------
raphman
Here's a similar script for sending customized emails to multiple recipients
defined in a CSV file (without MIME/attachment support).

[https://github.com/RaphaelWimmer/csv_mailer/blob/master/csv_...](https://github.com/RaphaelWimmer/csv_mailer/blob/master/csv_mailer.py)

------
hnriot
I don't understand how that can take more than two hours of someone who's a
college senior (presuming you're a CS student). This is just a handful of
lines of very simple python using one of the most documented and oldest web
protocols. There's also a ton if similar examples online using php, java, etc.
that should have taken more like ten minutes to write.

~~~
rjzzleep
it's funny you say that, because i find it funny that you assume it takes a cs
student to build that.

did we really dumb down so much that we're having problems using smtp
libraries nowadays? i don't think so.

~~~
goostavos
I'm currently a CS student, I'd argue that 2/3 of my class -- of not more! --
would need way more than two hours to accomplish the same 10 lines of code.

There exists a type of CS student that doesn't really seem to enjoy
programming all that much -- if at all. They do the minimum required to nail
that passing grade, and then never type another line until the next
assignment. Thus, when they actually need to pull on some of those tools (like
sending some mail), they aren't there.

Not that this guy is one of those, but I'm just saying, they exist, and in
alarming numbers.

~~~
SimHacker
A good CS student spends some time up front reading all the source code of the
libraries they're using, and some code that uses the libraries, to know what
they're really doing, what they're capable of, and to learn from them. And by
CS student, I include life-long students, and self-taught students.

------
cyansmoker
You can also look at how it's done in the Mezzanine network (disclaimer: I am
a minor contributor)

