叮叮当当 wrote: > supose a email part like this: > > Content-Type: Multipart/Alternative; > boundary="Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm" > > > --Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm > Content-Type: text/plain; charset="gb2312" > Content-Transfer-Encoding: 7bit > > abcd. > --Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm > Content-Type: text/html; charset="gb2312" > Content-Transfer-Encoding: quoted-printable > > .................. > --Boundary-=_iTIraXJMjfQvFKkvZlqprUgHZWDm-- > > the plain text is abcd, and the alternative content type is text/html, > i should prefer explain the html content, and i must not explaint the > two part ,so i want to get the boundary end. > > thanks all. > In other words, you *haven't* tried the email module.
email.Parser can cope with arbitrarily complex message structures, including oddities like attachments which are themselves email messages containing their own attachments. Read the documentation and look for sample code, then get back to the list with questions about how to make email do what you want it to. Please don't ask us to re-invent existing libraries. that's why the libraries are there. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list