Ruby + IMAP + Attachment

I am trying read out attachments using Net::IMAP, but this seems to be
going nowhere. Docs make no mention of such, and I am at a loss on where
to actually begin. I can read messages and such using Net::IMAP, even
got the filenavn of the attachment, but not the data for it, and thus
not able to store it as file or in a database.

Any suggestions?

Best regards,
Stian

···

--
Posted via http://www.ruby-forum.com/.

I am trying read out attachments using Net::IMAP, but this seems to be
going nowhere. Docs make no mention of such, and I am at a loss on where
to actually begin. I can read messages and such using Net::IMAP, even
got the filenavn of the attachment, but not the data for it, and thus
not able to store it as file or in a database.

You have an example in comp.lang.ruby

Search the thread "Retrieve email attachments using Net::IMAP" in google

Basically when you have a message id, you can do

  image.fetch(message_id, "BODY[1]")
  image.fetch(message_id, "BODY[2]")

Guy Decoux