Posted on August 9, 2009 - by J Lane
Apple Mail’s Handling of Attachments
When Apple said “Think Different”, they weren’t kidding. Especially as it relates to their handling of certain types of attachments in Apple Mail.
The Background:
My company, Industry Interactive, produces Mailmanagr. Mailmanagr lets people post messages, todos, milestones and files directly to Basecamp from their e-mail. Among other uses, if you’ve got a client that just can’t get used to logging into Basecamp and posting stuff there, you can just forward the messages they send you through Mailmanagr. Works great, unless you’re using Apple Mail.
While most mail clients (like Gmail, or Outlook) will handle files as attachments, Apple has decided to include them inline in the message. This is true for any type of file that Apple things is an image — so JPGs, GIFs, PNGs, PDFs — anything that displays within Apple Mail and doesn’t require a third party application to view. There are ways to get around it, and to force Apple Mail to deal with them as attachments, but that’s messy. As far as I can figure, it all comes down to this:
–Apple-Mail-14-963253153
Content-Disposition: inline;
filename=image004.jpg
Content-Transfer-Encoding: base64
Content-Type: image/jpeg;
x-unix-mode=0644;
name=”image004.jpg”
Instead of the standard:
Content-Type: image/jpeg; name=”image001.jpg”
Content-Transfer-Encoding: base64
X-Attachment-Id: 0.0.1
The problem here is that certain types of clients can’t figure out that there is an attachment on the message. Mailmanagr suffers this problem and so “image” attachments forwarded from Apple Mail don’t get sent through to Basecamp.
The Solution:
There is a workaround, but it’s extremely messy. In Mailmanagr’s case, I have to write a completely different way of dealing with file attachments for Apple Mail than for any other e-mail client. It’s a pain – I’ll have to sniff the “X-Mailer” and then handle accordingly. So far, only one customer has had this problem so I’ve been putting off developing the fix.

Flyingtroll.com is the personal web site of Jonathan C Lane, a Mayne Island, BC-based web developer, author and all-around great guy.
0 Comments
We'd love to hear yours!