Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix apparently-corrupted PDF attachments in Mail Apps
Lately I'd been having trouble with PDF attachments in Mail -- but only on my MacBook Pro. Instead of seeing a preview of the PDF in the message, I'd see a small black square, maybe 10x10 pixels in size. If I tried to avoid the problem by saving the PDF, the resulting file couldn't be opened in either Preview or Reader; I'd get an error message saying the PDF was corrupt. However, the very same message on my Mac Pro (using IMAP on both Macs, with the message in the inbox) worked perfectly, so I knew it wasn't a problem with the message itself.

After pulling my hair out for a while (no luck with Google searches, no Mail plug-ins on either machine, etc.), occasional macosxhints editor Kirk McElhearn suggested a solution that I hadn't even considered: rebuilding the mailbox on the MacBook Pro. Sure enough, after selecting Mailbox » Rebuild, all the troublesome PDF attachments were magically resolved -- previewing and saving both work as expected now. The odd thing about this is that, outside of messages with PDF attachments, that account was working perfectly on the MacBook Pro.

Because I came up empty when I googled for this issue before, I thought I'd post it here in case someone else is having the same problem.
    •    
  • Currently 3.57 / 5
  You rated: 3 / 5 (7 votes cast)
 
[20,561 views]  

Fix apparently-corrupted PDF attachments in Mail | 9 comments | Create New Account
Click here to return to the 'Fix apparently-corrupted PDF attachments in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix apparently-corrupted PDF attachments in Mail
Authored by: apenstaartje on Nov 10, '08 07:42:34AM

I tried your fix but it doesn't work on pdf attachments going missing (yeah, it's not the same issue, but I thought it might work).
My situation is that I get an email containing 3 attachments. The number is correctly shown in the listing, but when I open the mail, the pdf is not shown in the mail and the attachment counter inside the mail pane view is 2 and it won't be saved when you click save all.

I know for sure the pdf is there, it is in the raw source, it is there on any other mail client.... too bad rebuilding doesn't work. So if you have this issue, the fix in this hint won't work on that.



[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: Anonymous on Nov 10, '08 03:23:51PM

It might be worth trying to send the message to a Gmail, or other free online account -- and then send it back again. It sounds like you actually have a corrupt message, rather than a corrupted mailbox.

In my experience, Apple Mail doesn't make good sense of some weirdly formatted messages. For an obvious example of this mishandling, send a message alternately between Apple Mail and Hotmail and look at how the multi-level quoting breaks -- all because Mail expects greater-than followed by space, and Hotmail simply prepends a greater-than sign.

I'd be willing to bet it's something similar to this.



[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: rycardo on Nov 10, '08 09:18:53AM

I've had this issue with image files, didn't think to rebuild, always asked the sender to resend the message.

Great hint!



[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: arizdave on Nov 10, '08 11:27:45AM

OK - I give up. I can't find a REBUILD button or anything in mail. Where is it - exactly :-(



[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: howard-ny on Nov 10, '08 12:15:54PM
Rebuild is under the menu Mailbox, at the very bottom. It is selectable ONLY if you have one--and only one--mailbox selected. This will rebuild the one mailbox you have selected.

Not very practical if you have dozens or hundreds of mailboxes, as I have.

There is a free program, SpeedMail, that will rebuild all at once:
http://www.1802.it/speedmail.php

Howard

[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: lar3ry on Nov 10, '08 06:52:49PM

Broken link attempting to actually download the application



[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: focused on Nov 10, '08 01:54:15PM

Brilliant, thanks. This also fixes a problem I've been having with .doc attachments that appear as a long garbled string in the message without the attachment. dmgcourses, to rebuild a mailbox, select Mailbox > Rebuild (last menu item for me).



[ Reply to This | # ]
SpeedMail alternative
Authored by: TinyApps.Org on Nov 10, '08 08:58:24PM
You can use this single command line to do the same thing as SpeedMail:
sqlite3 ~/Library/Mail/Envelope\ Index vacuum
Be sure to quit Mail.app first. Use at your own risk (and joy).

Via Hawk Wings and Hugin777 on this thread

[ Reply to This | # ]
Fix apparently-corrupted PDF attachments in Mail
Authored by: ibalbin on Nov 16, '08 02:27:33PM

The problem occurs (with me) on most machines. It manifests itself when I'm either travelling and on a slow connection, or when a whole lot of emails come in at once with attachments. The files are fine on the mail server. If you get another client (such as Thunderbird) to download the messages, it works.

This has been a bug since day one of Mail.app and has consistently not been attended to in my view. My bet is that it's some synchronisation issue with the server and processes not properly completing before closing files.



[ Reply to This | # ]