# Trouble reading attachments on OS X

**URL:** <https://www.ruby-forum.com/t/trouble-reading-attachments-on-os-x/82250>\
**Category:** Rails\
**Created:** [January 18, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/trouble-reading-attachments-on-os-x/82250 "2007-01-18T15:32:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![huli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d07c76/32.png) [@huli](https://www.ruby-forum.com/u/huli)\
**Post date:** [January 18, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/trouble-reading-attachments-on-os-x/82250/1 "2007-01-18T15:32:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![huli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d07c76/32.png) [@huli](https://www.ruby-forum.com/u/huli)\
**Post date:** [January 18, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/trouble-reading-attachments-on-os-x/82250/2 "2007-01-18T16:56:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![huli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d07c76/32.png) [@huli](https://www.ruby-forum.com/u/huli)\
**Post date:** [January 18, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/trouble-reading-attachments-on-os-x/82250/3 "2007-01-18T16:39:12Z")

</div>

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 H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
