riverguardian
unread,Jul 21, 2011, 1:32:55 PM7/21/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby's Mail Discussion Group
I'm trying to read an attachment from an email received and
mail.attachments.length is giving me a correct number, so I can tell
that the attachments are there. However, when I do
File.open("public/images/" + to+"_"+from
+"_"+mail.attachments.first.filename,"w+") { |local_file|
local_file << mail.attachments.first.decoded
}
I get the following:
"\xC4" from ASCII-8BIT to UTF-8
I guess it's a bit frustrating because all the documentation
highlights how to send emails, and not parsing them