Re: question for the part location of multipart message

2022-01-02 Thread raf
On Sun, Jan 02, 2022 at 01:23:38PM +0100, Jaroslaw Rafa wrote: > Dnia 1.01.2022 o godz. 11:40:37 Frank Hwa pisze: > > > > For a multipart message, is text/plain part always in the first > > location? > > I just want to extract the plain text body of a message. I use the > > code below (python)

Re: question for the part location of multipart message

2022-01-02 Thread Jaroslaw Rafa
Dnia 1.01.2022 o godz. 11:40:37 Frank Hwa pisze: > > For a multipart message, is text/plain part always in the first > location? > I just want to extract the plain text body of a message. I use the > code below (python), but was not very sure. I have a perl script that extracts all text/plain pa

Re: question for the part location of multipart message

2021-12-31 Thread Bill Cole
On 2021-12-31 at 22:40:37 UTC-0500 (Sat, 01 Jan 2022 11:40:37 +0800) Frank Hwa is rumored to have said: Hello For a multipart message, is text/plain part always in the first location? No. Arguably it SHOULD be first in a multipart/alternative, but it isn't always. Also, there are other su

question for the part location of multipart message

2021-12-31 Thread Frank Hwa
Hello For a multipart message, is text/plain part always in the first location? I just want to extract the plain text body of a message. I use the code below (python), but was not very sure. b = email.message_from_string(x) if b.is_multipart(): for part in b.get_payload(): print