I\'m trying to read an email using ruby mail gem.
But mail.body.decoded returns me not just the body message. How can I clean up this body message and remove unwan
looks like you've got a multipart email, so you can use
mail.parts[0].body.decoded
These will probably come in handy too:
mail.multipart?
mail.parts.length