ActionMailer attachment troubels

Hi!

As per the API Docs, I’ve put this in my Actionmailer class

attachment :content_type => "application/csv",
:body => File.read(filename), :content_disposition => 'test.csv'

The email arrives okay and all but the filename is ignored and the
newlines in my CSV file are gone (replaced by something else).

I must admit I’m receiving this through MS Exchange …

Any ideas?

Jeroen

Jeroen wrote:

Hi!

As per the API Docs, I’ve put this in my Actionmailer class

attachment :content_type => "application/csv",
:body => File.read(filename), :content_disposition => 'test.csv'

The email arrives okay and all but the filename is ignored and the
newlines in my CSV file are gone (replaced by something else).

I must admit I’m receiving this through MS Exchange …

Hmm, seems like exchange screws the file a bit by changing the line
endings. The file opens fine in Wordpad, which is a little more
flexible/intellegent with differnt line endings than notepad it seems…

Just need to get the filename problem worked out but I’m afraid this is
also not to do with rails but rather with Exchange/Outlook :frowning:

Jeroen