Displaying 1 result from an estimated 1 matches for "part_body".
2006 Jul 05
1
TMail + Receing mail and extract attachments
...ed."
end
pop.finish
>>
#Mailmain
<<
class Mailman < ActionMailer::Base
def receive(email)
#puts email
mail = TMail::Mail.parse(email)
mail.parts.each do |part|
if ''image/jpeg'' == part.content_type
part_type = part.content_type
part_body = part.body.base64_decode
filename = part.disposition_param(''filename'')
puts part_type
puts "----- Separator -----"
puts part_body
puts "----- Separator ---"
puts filename
end
end
#~ #ticket = Ticket.new
#...