0

I use Mailman in my RoR projekt

I want to receive mails and display the body ..... but ther is a format error

i get the mail and want to save it as text

message = message.body.encoded

that works!!!

But the output is not only the body of the mail it also includes some more infos like

f46d04451843a6499e04c08f212a Date: Mon, 21 May 2012 19:29:19 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-ID: <4fba7b6fa56a0_1e194c540145299d@ubuntu.mail>

but that i do not want to disply that infos like Mime, Date .... can someone tell me how in only get the body of the email or how i can cut away the other infos???

user1402147
  • 113
  • 1
  • 7

1 Answers1

0

Try

message = message.text_part.body.decoded

robzolkos
  • 2,196
  • 3
  • 30
  • 47