Hi, I try to send a multipart message with actionmailer under rails3. When the mail client receives the mail the attachment is empty. I do definitely attach a non-empty file. Here is the code:
>snip recipients ["sec...@secret.com"] from "sec...@secret.com" subject "my subject" attachments.inline['pict.png'] = File.read File.join(Rails.root, 'public/images/pict.png') #works fine part(:content_type => "multipart/alternative") do |p| p.part :content_type => "text/plain", :body => render("verwertung.text.haml") p.part :content_type => "text/html", :body => render("verwertung.html.haml") end attachment :content_type => "text/csv", :filename => "verwertung.csv", :body => File.read('/tmp/verwertung.csv') >snip The mail looks fine, e.g. the inline attachment is included, but the attached file is empty! What is the problem here? Best regards, Thomas -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.