Re: Creating message parts
Mark Sapiro <[email protected]>
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Organization | Not Very Much |
| Message-ID | <PC18702008092408135505317425130a@msapiro> |
Nicholas Cole wrote: > >I'm trying to create a message part that will later be attached to >another message. However, if I do > >E = email.mime.multipart.MIMEMultipart() >print E.as_string() > >Then E is given a "MIME-Version: 1.0" header, which I don't think it >should have (the "parent" email message will have that header, of >course). > >I have a feeling, therefore, that I am doing something wrong! Should >I not be using the MIMEMultipart() calss for this purpose? And if not, >what should I be using? See <http://docs.python.org/lib/module-email.mime.text.html>. You should use classes like email.mime.application.MIMEApplication, email.mime.image.MIMEImage, email.mime.text.MIMEText, etc. to create the various message parts and then append them to the payload of the parent message. -- Mark Sapiro <[email protected]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan