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 ["secret@secret.com"]
from "secret@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
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 ["secret@secret.com"]
from "secret@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