How can I make it so ActionMailer always shows attachments at the bottom of the message: HTML, TXT, Attachments....
Problem is the attachment here is a text file:
this is rail 2.3 code (might be slightly different in rails3)
just move you text part before attachment
recipients to@domain.com
from me@domain.com
subject "some subject"
content_type "multipart/mixed"
part "text/plain" do |p|
p.body = render_message 'my_message' #this is template file
end
attachment "application/octet-stream" do |a|
a.body = File.read("some_file.jpg")
a.filename = 'name.jpg'
end