Solving the mysteries of the Mail Downloads folder
By Sharon Zardetto, Macworld
The scenario is straightforward: You receive a message with an attachment in Mail and double-click the attached file to open it in the appropriate app. But what happens next is anything but straightforward: file attachments are stored in a hard-to-find folder; they are sometimes downloaded more than once; and different apps treat these opened files in very different ways.
Where is /Mail Downloads?
When you open a Mail attachment with a double-click, it opens in its parent app, just as you’d expect. But it’s also automatically (and secretly) downloaded into the aptly named Mail Downloads folder.
The folder’s name is the only thing that’s obvious about it: it’s deeply buried in a series of folders, one of which is invisible. To view its contents, choose Go > Go to Folder in the Finder, type (or copy and paste from here) ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads, and click Go.
You should visit this folder sometime if only because it probably has at least a gigabyte of detritus, much of which you could probably trash. You’ll likely find hundreds of folders (my husband’s Mac had 1800 of them) with alphanumeric names, each holding a downloaded attachment. That seemingly inefficient setup is necessary in order to avoid having identically named attachments saved to the same folder.
Prior to OS 10.9 Mavericks, this folder was located at ~/Library/Mail Downloads. If you upgraded from an earlier system, that folder may still be around. If so, you should check it for leftovers; although its contents should have been automatically migrated to the new folder, I recently found I still had items sitting in mine. You won’t find enclosing folders in that older folder; in previous operating systems, identically named downloads had numbers appended to their names in order to differentiate them.
What goes in Mail Downloads?
An attachment is automatically saved to the Mail Downloads folder whenever you:
Open the file with a double-click or with the Open Attachment command in its contextual menu.
Control-click a file and use any contextual menu command. If you Control-click but then change your mind and just let the menu close—too late! A copy is stored the moment you open the menu.
Use Quick Look to view it.
An additional copy of the attachment goes to Mail Downloads every time you repeat any of the above actions after having “left” and then “returned to” the message window. This includes when you: close and reopen the message window; look at a different message in the Viewer window and come back to the one with the attachment; and quit and re-launch Mail.
An attachment doesn’t go to Mail Downloads when you save it, which you can do with File > Save Attachments or by using the pop-up menu accessible from the gray header/message divider line when you hover anywhere in the message header. In those cases, it’s saved wherever you put it.
What happens when you edit an attachment?
When you open an attachment directly from a Mail message into its parent app, your edits sometimes seem to be saved and sometimes not. Why is that? And why do those edits sometimes seem to alter the original attachment? It all depends on the attachment’s default app.
Let’s say, for example, that you double-click an attachment that by default opens in a Microsoft or Adobe app. That attachment is then saved to the Mail Downloads folder (as explained above) and opened in its associated app. If you edit the document and use the Save command (not Save As), the edited version replaces the original file in the Mail Downloads folder. If you use the Open Recent command in the app later, it opens that altered copy.
But say you want to go back and check something in the original attached file. In Mail, you double-click the attachment again or take a Quick Look peek, reasonably assuming that you’ll get the unedited original. Sometimes you will and sometimes you won’t. Sometimes?
If you haven’t closed the message with the attached file and try to view the “original” attachment, Mail will show you the copy that’s stored in Mail Downloads—the one you edited. But if you do close the message, then reopen it and double-click the attachment, you will see the original version. That’s because Mail saves a fresh copy of the attachment to Mail downloads when you reopen the message, and that’s the file that opens.
To avoid this mess, the best way to open an attachment in one of these non-Apple programs is to first explicitly save it from Mail into an appropriate folder with File > Save Attachments or by using the Attachments pop-up menu on the header divider. Then you can open and edit that copy of the file in the app.
Apple apps such as Pages, Numbers, TextEdit, and Preview—as well as Nisus Writer Pro (kudos!)—treat attachments differently. When you double-click a file attachment belonging to one of those apps, its title bar changes to Untitled (OriginalName copy). In other words, it’s treated as a new document, so you can’t inadvertently save over the original version in Mail Downloads. As a result, if you view or reopen the original from within Mail, you always see the original version.