Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail.app- 'Remove Attachments' corrupting mails

I have a weird issue that I've not seen mentioned anywhere. Wondering if anyone can give me any debugging tips.


I'm using Mail 5.0 in Lion 10.6.1 (issue was occurring in 10.6.0 as well).


I have Mail connected to Exchange Server 2010.


I have a fairly tight restriction on mailbox sizes so I have to remove attachments from emails before I file them.


My problem is this; about 1 in 3 times I remove an attachment the 'replacement' e-mail is full of gibberish characters.


Typically if I look at the raw source of the e-mail then the text version of the mail is retained correctly- it seems to be the Base64 encoded version that is corrupted.


Any idea what I can do to debug this? I have tried removing the envelope files and removing/adding the account back in and re-syncing it but the issue has reappeared.


I've reported this to Apple on http://bugreports.apple.com but have not had a response.


Thanks in advance.

Unibody MacBook Pro 15" 2.8GHz, Mac OS X (10.6.1)

Posted on Aug 22, 2011 7:48 AM

Reply
116 replies

Jun 8, 2015 6:15 AM in response to Screaming.Pict

Hmm, strange. Today I noticed that my Mail is less keen on corrupting messages than before. During the day's work, I've removed attachments from a number of messages, from people whose messages normally induce the corruption problem, without any problems at all. I checked if Mail had been updated in the background in some way, but it doesn't seem so. Could it be some kind of cosmic convergence?

Jun 19, 2015 4:26 PM in response to Rich In Space

Thank bro!!! That was epic! Just for the other people that have same problems with iCloud! I had the same situation in iCloud and I had to:


1) run your script (didn't see my email being fixed)

2) change to an other folder/inbox/wtvr and then return back the the problematic inbox (then I say my mail being fixed)

3) I had to move my mail to a local folder

4) move the mail back to iCloud


If I don't do steps 3 and 4, the mail returns to the corrupted form

Jul 14, 2015 3:41 AM in response to Rich In Space

The public beta still has this encoding issue unfortunately and your really helpful script may need tweaking (or it might just be beta software issues) but understand if you'd only want to look at this for final release. Just a heads up in case. Have been a daily user of the script since you made it available so am much in debt for your time to date. 😎

Aug 18, 2015 6:31 PM in response to Screaming.Pict

Removing an attachment from an email message in Mail under 10.10.5 just turned the body of the message into gibberish, again. Same behavior as in prior iterations of the OS.


The good news is that the fix still works (change the second occurrence of "base64" to "quoted-printable").


Hey, Apple, as of 8 days ago, this sore has festered for 3 years now. Happy birthday.

Aug 20, 2015 1:13 AM in response to Rich In Space

I tried the following, just out of curiosity, with an email where deleting the attachment changed text to chinese:


  1. Searched for the email using Spotlight
  2. Opened the email (.emlx) file using a text editor (TextWrangler)
  3. Replaced "Content-Transfer-Encoding: base64" with "Content-Transfer-Encoding: quoted-printable"
  4. Saved the file
  5. Switched to Mail where the email was now readable but the preview was still garbled.
  6. Rebuilt the mailbox
  7. Voila, back in business!


My setup: Yosemite 10.10.5, Apple Mail 8.2

Aug 20, 2015 1:33 AM in response to zoranpop

@zoranpop, this is what we've been doing all the time in this support thread. Please, read comments above.


Also, I left an AppleScript letting you perform these steps easier, with a single click in the AS menu from within Mail (see link at April 10 above). It also adds some other valuable sanity checks. Feel free to use it (source code is open).

Mail.app- 'Remove Attachments' corrupting mails

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.