image

Disable Mac Mail.app Inline Image Attachments

May 1st, 2009 | 47 Comments

I’ve found this to be a real annoyance, especiallly with a business where I have to send images in emails often. Mail.app by default displays images inline, and most email clients won’t recognize them as attachments. If you right click (or ctrl click with a one button mouse) on the image you can select to view the image as icon, which makes it behave like a normal attachment. To make this the default behavior you’ll need to use the Terminal to set the preference. Terminal is in Applications>Utilities. Open Terminal and type:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

That will make every attachment you send act like an attachment instead of a pretty unusable decoration.

If you decide this isn’t what you’re looking for, to restore inline attachment viewing type:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool false

Restart Mail and you’re back to normal.

Tags:   · ·

47 comments

1 Dave Birch on 05.18.09 at 9:40 am

Thank you so much! This has been frustrating me forever!!!


2 Russell Fulton on 05.18.09 at 6:34 pm

Thanks indeed. We are starting to get inline porn spam though our filters and this at least stops it being displayed by default.

One other thing, can anyone tell me where the list of these application attributes are documented?


3 Micah on 05.18.09 at 10:15 pm

Glad I could help. The most complete documentation of hidden application prefs (including this one actually) can be found here:

http://secrets.blacktree.com/

Some are neatly wrapped up in a pref pane but many many others can be found there by clicking the ‘more’ link at the bottom of that page.


4 Michael on 05.26.09 at 11:40 pm

THANK YOU!! This has been killing me..


5 spencer on 05.28.09 at 8:48 pm

I just tested and it works fine when reading the message in Mail. But when I send a message from Mail.app to a Gmail account it still sends as an embedded image; the icon is smaller and cropped. A little strange that Gmail won’t recognize it as a proper attachment.


6 Micah on 07.16.09 at 9:29 pm

@spencer did you drag and drop your image into the email? I just tried emailing my gmail account and it came through ok when I added it by clicking on the ‘attachment’ button.


7 Aaron on 09.09.09 at 7:49 pm

How do I undo the script and show messages inline again?


8 Micah on 09.10.09 at 10:42 am

I haven’t tried but I assume like this:

**edit 07/28/10 ** I removed this as it wasn’t working. The proper fix is now added to body of this post **/**


9 Kyle on 09.14.09 at 11:45 am

I can confirm that GMail and anybody reading your message in Outlook will see your attachment as a small icon. It does not come through as a “proper” attachment by using the “View as Icon” option when viewed in Outlook.


10 Mario on 11.06.09 at 1:27 pm

Fantastic! It’s been driving me nuts.


11 Jay on 11.15.09 at 6:30 pm

Thank you so much – it’s the biggest annoyance I have had with Apple Mail (replacing Outlook).


12 Mike on 11.30.09 at 3:56 am

This has been driving me crazy too….new to Apple
as of April this year, fantastic machine but some annoying and weird configurations.


13 Hellion on 01.04.10 at 10:31 pm

YES!!!! GOD SENT I SAY!!! finally I can send attachments the normal way….. didn’t know about the hold down option though. oh well thanx anywayz


14 Mark on 01.18.10 at 11:29 am

well done!


15 Kathy on 02.03.10 at 1:11 pm

I’ve tried your script (both off and on) and it works to make the image appear as an icon instead of inline. However, my Windows-using recipients still tell me that they are not receiving “attachments” – even though it sure looks to me like I’m providing attachments. This only happens with JPGs. Would really like to fix this so that PC users see attachments that they can download. Got any more ideas?

Here’s a comment from a programmer friend with whom I’ve tested:

the email code looks like its auto loading the attachment and somehow its getting embedded

from the code:
kk


16 Kathy on 02.03.10 at 1:12 pm

Hmmm… Your blog software must be filtering out the code sample.


17 Micah on 02.03.10 at 1:19 pm

@Kathy how did you add the attachments to the email, drag and drop or by clicking the attachment button? I would make sure you add them with the button, and then make sure that ‘Send Windows-Friendly Attachments’ is ticked on the bottom of the file selection window. If you’ve done all that already try pasting your code into a pastebin (pastebin.com) and I’ll take a look.


18 Micah on 02.03.10 at 1:25 pm

One more thing! Use plain text email.


19 Mark on 02.04.10 at 7:12 pm

Set Preference to plain text, set to “send as windows friendly attachment” & email & select “view as icon”.
Sent email to myself & still the file comes embedded in text & not attachment.
Any ideas?


20 Micah on 02.10.10 at 11:03 am

@Mark I just emailed you. I’m pretty stumped there. I’ve had success with exactly those settings. I guess at this point either you or the person you’re sending images to should switch to Thunderbird, the Mozilla email client.


21 Jason on 02.23.10 at 4:33 am

I’ve been looking at this very problem today for someone at work and this application looks like a promising solution: http://lokiware.info/Mail-Attachments-Iconizer

I’m not sure if the plugin works by modifying settings like the one you mention or if it manipulates the mime-headers prior to sending the mail and for $15 I can’t be bothered to find out :-)
Seems to work.


22 Julia on 03.16.10 at 9:20 am

Hi Micah, When I typed “defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes” into Terminal it completely disabled me from attaching anything. I tried undoing it with “defaults write com.apple.mail DisableInlineAttachmentViewing -bool no” but Mac Mail still won’t attach. HELP!!


23 Julia on 03.16.10 at 9:28 am

Update::: Through secrets.blacktree I found to turn on Inline Attachments you type “defaults write com.apple.mail DisableInlineAttachmentViewing -boolean-neg” into Terminal. I tried this – still no dice. Attachments can’t be added by dragging into the email nor by using the “Attach” button. Did I just screw my Mac Mail forever?


24 Micah on 03.16.10 at 10:02 am

Have you tried rebooting your Mac? I doubt you’ve screwed your app forever, I find that when Mail hiccups it usually gets fixed by a reboot. If that doesn’t work you may need to delete your preferences file:
/Library/Preferences/com.apple.mail.plist


25 Julia on 03.16.10 at 10:08 am

Sorry for the 3rd Comment but this one is important to note. Found on this forum http://forums.macrumors.com/showthread.php?t=485751 : “Email won’t attach: Is the option ‘Always Insert Attachments at End of Message’ checked? I think this is a bug in Apple Mail. If you have the option selected, and you try to attach a file with NO text in the message, the file never gets attached. But if you just type a little bit of text, it attaches fine.” THIS was my problem. Not your Terminal command suggestion. Terminal command works! THANKS!!!


26 Alex on 03.25.10 at 5:16 am

Oh you LEGEND – you have bug-fixed an inline issue I have had for ages..Thank you so so much!


27 Leslie Mann on 04.06.10 at 9:38 am

Just switched to Mac, love it but like others a little frustrated with the mail.app. I followed this forum thread. Sending mail with attachments now working but the company logo in my signature switched from an imbedded image to an attachment when opened. Tried to go to the signature preference and drop a new logo in but to no avail. Still shows up as an attachment. Any help would be great


28 S Dawson on 04.06.10 at 12:50 pm

I found this on the interwebs somewhere:

Kmail: Default to Plain Text Alternative
Posted: Jul 16, 2005 12:21 PM

If you prefer to have Mail show you the plain text alternative (if it exists) of all HTML or RTF formatted messages in the Message Viewer, quit Mail and enter the following command in Terminal:

defaults write com.apple.mail PreferPlainText -bool TRUE

Ah, the way email was originally intended…quick and simple.

To restore Mail’s default handling of HTML or RTF messages, quit Mail and enter:

defaults delete com.apple.mail PreferPlainText


29 Micah on 04.06.10 at 1:09 pm

@Leslie I’m afraid I don’t use a logo in my email signature anymore for that very reason. I’m a plain text email sender all the way.

@S, <3 plain text email. No funny business.


30 Simone on 04.15.10 at 5:41 pm

you are a dead set champion, thank you. saved the day superman!! love your work!


31 Rod on 04.25.10 at 2:13 pm

I have a problem with MacMail. If I am using a signature, I can’t put an image (say a screen grab) inline in the text of my email. If I turn off the signature, I can do inline pictures in the text of the email, but if the signature is on the picture always goes to the bottom of the page. Help!!


32 Micah on 04.26.10 at 9:45 am

@Rod I don’t really mess with images inline anymore, because they get embedded in the message, which is usually an undesired behavior for me. How are you adding your image to the message? CMD+V? Attachment button? Drag n’ drop? I would try different ways and see if any work for you. If you’re just pasting from the clipboard, try creating a new file in Preview first (File > New From Clipboard) and saving it somewhere first. If you’re using the attachment button, try just dragging the file into the message, etc. Not sure if any of that will work for you.


33 Jonathan on 05.03.10 at 2:03 am

I am naming my next child after you!!!!

This was the worlds biggest ass pain!!!


34 Erba on 05.08.10 at 1:43 pm

Ok so my problem is I can’t get attachments to open. Some will and some won’t. I’ve looked everywhere and no one has an answer. Please help.


35 Ivy on 05.13.10 at 5:42 pm

Thank you! I just switched to a Mac and ALL my clients are complaining. I’m ready to ditch it and go back to being a PC.


36 Tim on 05.20.10 at 2:33 pm

Question – All of a sudden I cannot send attachments through the Mac Mail program. I can through mobile.me. I can receive, and have a good strong connection. The spinning wheel of death goes round for about 5 minutes and says the something about the server. When I do diognostics everything comes up fine. Any ideas?


37 Micah on 05.20.10 at 3:00 pm

@Tim @Erba This ain’t a support forum for Mail, sorry! I just wanted to share a setting I found that helped me out. One thing you can do that tends to fix most things right up… reboot your Mac.


38 Matt on 06.01.10 at 3:23 am

Thanks. On day Apple will realise that to become a real business machine they need to stop trying to be to cool… ;-)


39 Jenn on 06.02.10 at 6:13 pm

Hello,

I tried this

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

Yes it does make every attachment you send act like an attachment instead of a pretty unusable decoration on my mac but now when they arrive on my PC they have turned into inline thumbnails instead of the normal attachments!

So, I tried

defaults write com.apple.mail DisableInlineAttachmentViewing -bool no

to put things back in their original state but no luck, still doing the same.

HELP, what do I do now?

Jenn


40 Micah on 06.04.10 at 10:19 am

@Jenn I think this will do it.
**edit 07/28/10 ** I removed this as it wasn’t working. The proper fix is now added to body of this post **/**


41 James on 07.21.10 at 10:32 am

Micah,

Thank you for all the informative posts. I know the arguments against using only RTF/HTML email, but I still want all my messages sent in RTF all the time. I have found that even with RTF selected in preferences Mac Mail seems to almost randomly send in Plain Text sometimes anyway. Do you or anybody else out there know how to force Mac Mail to always send in RTF? Also, I have noticed that recipients of my RTF emails sometimes also receive an .HTML attachment. Is there some way to prevent that from happening as well and why is that occurring? It doesn’t happen for the same friends receiving RTF/HTML email from other PC users.

Thanks so much!
James


42 Kmart on 07.21.10 at 11:46 pm

Great fix! Thank you! I take it this is one of those gifts that keep on giving, given that you posted this a while ago and people like me are still benefiting :) .


43 mrcl on 07.27.10 at 12:44 pm

thaaaank you very very much!!!!
it’s really very anoying!


44 Carolyn Leroux on 07.27.10 at 9:16 pm

Help! I too tried to put things back to their original state after my work signature turned into inline thumbnails! I tried your “fix it” code (as given to Jenn) but it didn’t work.

Any other ideas??


45 Micah on 07.28.10 at 10:35 am

@Carolyn Leroux – Alright, I just now successfully enabled them using this code, and restarting Mail. I’ll add this to the original post now too.

defaults write com.apple.mail DisableInlineAttachmentViewing -bool false


46 Micah on 07.28.10 at 10:53 am

@James I’m sorry I really don’t know. I could dig around but I really don’t have much interest in RTF mail at the moment.


47 Micah on 07.28.10 at 10:57 am

@Kmart Yes if I ever implement threaded comments, this will be my testing ground! I’m surprised apple hasn’t resolved some of the issues related to Outlook. It’ll always make it hard to justify buying a Mac as a business computer.


Leave a Comment

All images and text ©2009 Micah Gilman, unless otherwise specified.