Can’t attach a file in Mail.app? Enter a message first.

Yesterday, it seemed as if Mail.app wouldn’t allow me to attach a file to a message all of a sudden. I created a new message to send a small file to our senior chemist, but the file just snapped back to the desktop. I quit and re-launched Mail, opened a new message, and got the same results. Logging out and back in, restarting, trying different files… all with the same results. I was baffled, and I was preparing for drastic measures like rebuilding my mail accounts or re-installing Mail.

It turns out, there’s a small bug in Mail.app that prevents attaching a file to an empty mail message if you have “Always Insert Attachments at End of Message” selected. If you drag the attachment, the icon will snap back, and if you use the menus or toolbar button to attach the file, it will appear as if nothing happened.

You might also see this in the log in Console.app:

*** Canceling drag because exception 'DOMException' (reason '*** NOT_FOUND_ERR: DOMException 8') was raised during a dragging session

As a workaround, just be sure you enter some text in the message body before attaching the file. Alternatively, you can uncheck Edit > Attachments > “Always insert attachments at end of message.”

In the end, my own faulty troubleshooting method was affecting my results. The reason it kept happening to me all the time, all of a sudden? I was so focused on testing the attachments, I never typed anything into any of the messages first. When I finally typed “ARGH” in frustration before attaching the file, I had the eureka moment.

“It’s the ants!” — Dr. Robert Campbell

2 Responses to “Can’t attach a file in Mail.app? Enter a message first.”

  1. Scott Says:

    Thank you!! That was driving me crazy! I couldn’t figure out why I couldn’t attach this file. (I thought the file was corrupt or something…) But this was the reason.

  2. Nick Says:

    Yep, cheers! Just encountered this and was about to start losing it.