generate and send mail with python: tutorial

maedox paal.nilsen at gmail.com
Fri Aug 12 03:21:23 EDT 2011


On Friday, August 12, 2011 8:51:33 AM UTC+2, Dennis Lee Bieber wrote:
> On Thu, 11 Aug 2011 08:07:09 -0700 (PDT), aspineux <aspi... at gmail.com>
> declaimed the following in gmane.comp.python.general:
> 
> > Hi I have written a tutorial about how to generate and send emails
> > with python.
> 
> 	Is that really such a difficult task?
> 
> 	Okay, I didn't really use Python for the entire creation of the
> message... But my first real Python program (using 1.4 or 1.5, whatever
> was included in the first "Programming Python" disk, for AmigaOS) was a
> rudimentary outgoing SMTPd which had to parse headers from  message
> files "queued" by an ARexx script from an Amiga version of ELM, then
> handshake with the ISP SMTPd to relay the message onward. It took less
> than a week after buying the book that I had this ARexx/Python hybrid
> working -- and it worked better than either C-language programs I'd
> downloaded (at that period of time, Amiga email programs ONLY read from
> local spool and queued to local spool; separate programs had to be used
> to read POP3 and send SMTP... My first SMTP utility presumed 1) direct
> connection to destination address, 2) created an email file for each
> address -- problem: if a destination did not have a receiving SMTPd [ie,
> one needed to do an MX lookup instead] it would hang trying to send that
> message, and never process others... The second program used ISP relay
> -- but it only parsed the "TO:" header, and thereby failed to handshake
> CC and BCC destinations)
> -- 
> 	Wulfraed                 Dennis Lee Bieber         AF6VN
>         wlf... at ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Nice story bro...



More information about the Python-list mailing list