Just an update:

I've checked through the documentation for ActionMailer.
Reusing the example they list in their documentation I now have:

def message(sent_at = Time.now)
  from 'b...@example.com'
  recipients 'j...@example.com'
  subject 'New message'
  sent_on sent_at
  attachment "image/jpg" do |a|
    a.body = File.read("public/images/test.jpg")
    a.filename = "hello.jpg"
  end
end

test.jpg exists in the folder public/images and is definitely a jpg.

In my previous post I had configured my app to use the mail transfer
agent on my production server (presumably sendmail).

To eliminate this as being the problematic link in the chain I also
configured my rails app to use my gmail account to send the email.

Again the mail generated in my rails app gets delivered, but with the
image attachment I get exactly the same result (jpg doesn't display
inline and when I download it and try to open it I get the message "File
corrupt).

Could anyone give me a clue as to what I am doing wrong?

I'm using rails 2.3.8

Thanks very much in advance.

-- 
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-talk@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.

Reply via email to