I am sending e-mails with actionmailer and I have the following code to
send an e-mail with an attachment:
      @headers[''Content-Type''] = "text/plain;
charset=utf-8;
format=flowed"
      @body["application_id"] = app_id
      unless (file.blank? || file.kind_of?(StringIO))
           attachment :content_type => "multipart/mixed",
              :body => tempfile.read,
              :filename => tempfile.original_filename,
              :charset => "utf-8"
      end
That works fine as long as I am reading the e-mails (with the
attachments) on a windows operating system. Strangely enough it does not
work on OS X. On Tiger for example this does not work. An image (jpg)
file works but a pdf file will not be readable. (Strange characters
only) I can read the e-mails on Mac but I cannot open the attachments.
The server is a debian sarge.
Any ideas?
Thanks a lot.
-- 
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
augustlilleaas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-18  15:38 UTC
Re: Trouble reading attachments on OS X
Sounds kinda weird that this is platform related like that. Does it apply to all (or at least more than one) e-mail clients on OS X? On Jan 18, 3:32 pm, Chris Huli <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am sending e-mails with actionmailer and I have the following code to > send an e-mail with an attachment: > > @headers[''Content-Type''] = "text/plain; charset=utf-8; > format=flowed" > @body["application_id"] = app_id > unless (file.blank? || file.kind_of?(StringIO)) > attachment :content_type => "multipart/mixed", > :body => tempfile.read, > :filename => tempfile.original_filename, > :charset => "utf-8" > end > > That works fine as long as I am reading the e-mails (with the > attachments) on a windows operating system. Strangely enough it does not > work on OS X. On Tiger for example this does not work. An image (jpg) > file works but a pdf file will not be readable. (Strange characters > only) I can read the e-mails on Mac but I cannot open the attachments. > The server is a debian sarge. > > Any ideas? > > Thanks a lot. > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am not sure about that but at least it happened on every e-mail client it was tested. (So far on 2 Installations) Don''t know which e-mail client those guys used - but I can get this information I think. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---