Hello Everybody,

I have been trying to extract the body of all the email messages from an mbox file. I have manages to separate the headers and get a string out that looks like 1) and 2) I would like to just extract the message and if there is only jibberish as in the case of 1), I would extract nothing.
Can anyone help me with this.

Any help would be appreciated.

-Grishma

1)Subject: Fwd: Corrections
Attachment: None
Body: SGV5IEpvc2VmLApJJ20gYXR0YWNoaW5nIHRoZSBwZGYgd2l0aCB0aGUgY29ycmVjdGVkIHZlcnNp
b24gb2YgdGhlIHRoZXNpcy4gQmVsb3cgaXMgdGhlCnN1bW1hcnkgb2YgY2hhbmdlcy4KCgoKMS4x
IHBhZ2UgMToKYWRkZWQgZm9vdG5vdGUgY2xhcmlmeWluZyBzaGFsbG93IHBhcnNpbmcKCjEuMiBw

2) Subject: Paper Outline
Attachment: None
Body: ------=_Part_58921_30058516.1220801860686
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi S,

I have attached my paper outline to this e-mail.
Any suggestions would be much appreciated

-X

------=_Part_58921_30058516.1220801860686
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">Hi S,<br><br>I have attached my paper outline to this e- mail.<br>Any suggestions would be much appreciated<br><br>-X<br></div>

------=_Part_58921_30058516.1220801860686--

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to