Top 10 iTouch / iPhone Applications
Top 25 New Music Releases
Top 25 songs
Top 10 TV Episodes
Top 10 Rented Movies

Recipient cannot see attachment when pasting signature into email

Recently it came to notice via one of our users that if you use an app like iBooks to send an attachment and then paste the signature, the recipient was not able to see the attachment when the email arrives in their email client. And if you can see the attachment, tapping on the attachment doesn't allow you to save it to iBooks but save as image.

We have confirmed that this is generic issue with IOS 5.1.1 and not specific to Signature. Attachments showed as images. Here's what we have managed to figure out.

Firstly how it should work. On the Mac, when you send a when you send a PDF, it adds an extra header called content-disposition: inline which tells the recipient, it's an attachment but try to render it inline if you can. On most email clients, they can't render the PDF as inline so they just show the attachment icon for you to save. (BTW: on the Mac, you can bring up the context menu on the attachment and select view as icon or view in place.) This means you can have a richer viewing experience without causing issues for non-Mac email clients. Most email clients can only render images inline and not other document types.

Here's the issue with IOS 5.1.1, instead of setting the content-disposition header, they actually force the PDF to be inline (embedded) with a content-id. So when it gets to non-Mac browsers, a broken image appears (because they don't know how to render the image which is actually a PDF) and no attachment icon is shown (even though it is in the email). For Mac users, the PDF can't be saved as a PDF because it's saying it is actually an image.

Why does it seem to be random? Two reasons:
a) If you used iBooks and just send the PDF with a bit of text, the email is sent as plain text and the PDF isn't added inline. But if you pasted rich text (like an HTML snippet), it immediately adds the PDF as inline causing the above issue. In our case, pasting the signature into the email will do it.
b) If your PDF has more than one page, it will never show it in-line / in-place regardless of whether it is plain text or rich text. In the case of iBooks, if you PDF had more than one page, adding the signature would not cause any issues.

Of course, all of this could also be prevented if you were using the attachments feature inside of signature that allows you to automatically add an attachment every time you used a signature. So far, Apple does not seem to apply the same logic to our attachments as they do in iBooks, Pages etc.