Actionmailer receive

I login to a pop3 account, download messages, and want to process the emails before storing them. I can extract all the header information using actionmailer with no issues. I can't figure out how to extract the body, and the attachments.

There is very little documentation available on how to receive using actionmailer, as opposed to sending with it. Can someone please let me know how I can extract the body and the attachments in rails?

Thanks!

Anybody? Please?

I used TMail to get something like mail.body, what I need is a way of decoding it, so that I can properly display it. If it is an html email for example, I get two versions with the same text, one is text only, and the other one is one with all the html tags, problem is, they are all part of the same string. How do I separate them?

Thanks.