Email attachments

LutherRevisited lutherrevisited at aol.com
Fri Oct 22 22:47:20 CEST 2004


Is there a way I can put a message together without having to download any
attachments there may be at the same time.  I'm not having any problems dealing
with attachments, but the way I'm doing things makes me download the complete
message first, attachements and all:
mail = []
for j in M.retr(i)[1]:
    mail.append(j.rstrip())
inMail = email.message_from_string('\r\n'.join(mail))

I don't have a real problem per se with this, it's just that I would just as
soon not download the attachments as well at first.  Also I'm wondering, are my
attachments potentially dangerous at the state when I first get them as part of
the email, or are they not potentially dangerous until I binary write that part
of the message into a file(that's how I'm dealing with attachments, if I want
to keep an attachment in the already downloaded complete email, I just write it
to a file.



More information about the Python-list mailing list