attachment is not proper in mail in rails
- by Harsh Raval
hi,
i'm sending a mail with attachment(1.pdf) but in mail it doesnt shows 1.pdf instead it shows some random file named "ATT008220.dat".
i'm using Rails 3.0
following is the code i'm using:
        @file = File.read('c:/1.pdf')
        @file.force_encoding('BINARY')
        attachment "application/octet-stream" do |a|
            a.body = @file
        end
anybody knows why its happening? any idea?
Thanks & Regards,
Harsh Raval.