[Tutor] Attachment to a mail message

lonetwin lonetwin <lonetwin@yahoo.com>
Wed, 24 Oct 2001 18:00:27 +0530 (IST)


Hi all,
   I have a lil' question, how does one send a mail alongwith an
attachment using python ?? I already know that one can do a

import smtplib
conn = smtplib.SMTP(Server)
conn.sendmail(From, To_addr, Msg)

to send Msg to To_addr, thru' Server....
....I'd like to learn how to add an attachment (MIME encoded ??) to this Msg,
so that I can send mail with attachments confirming to mail standards on the net.

I had a look at three mime related modules mimetools, MimeWriter and
mimify from the std. lib, but since I don't know anything about MIME (the
what...the where ..the why ...the how) I could not decide on even how to
begin playing around with these...I'm hoping somebody could give me a
quick crash course on this or at least point me to some nice
resource (just something that provides a simple explaination....where a
quick read-thru' will explain what happens when we send/recieve a
mail with attachments)

Peace
Steve
-- 
----------------------------------------------
Every oak tree started out as a
couple of nuts who stood their ground.
                                    Anonymous
----------------------------------------------