Closed cas27 closed 11 years ago
I have the same problem (
Has anyone solved this?
Yeah here is how I got it to work
File.open(saveLocation,"w+") { |local_file| local_file << email.attachments.first.decoded }
Yup I got it too with email.attachments.each do |a| file = File.new("attachments/" + a.filename, "w+") file << a.decoded file.close
File.delete("attachments/" + a.filename) #just in case
end
Thanks for the quick reply anyways!
I think the cause here is that both the 'mail' gem and 'ruby-gmail' define a class Mail::Part, and the former gem wins the naming conflict.
This works for me too! ;)
Sorry, this was a mistake in the readme, the mail gem doesn't offer that method.
Here is my code
Getting this error