macOS Mail: Draft message from hell

I have a draft message that I want to delete from my Mail app. It was originally sent from my gmail account — which (from what I have read online) may be relevant. In any case, I cannot delete it.

To be more accurate, it does delete. And I can further delete it from the Trash. But, within about 48 hours, it returns again.

I have tried everything I can think of. I have changed the To and From addresses, eliminating any reference to Gmail. I have tried resending the message and then deleting. I have gone to mail.google.com to see if I can delete it from there. And more. Nothing works.

It’s a like a zombie that can’t be killed. Suggestions?

Well… In the Mail app, go to Mail / Preferences (or Mail / Settings if you are using Ventura), go to the Accounts one, chose your Gmail account, go to “Mailbox Behaviors” - where are “Drafts” set to be stored? For my Gmail account they are set to “[Gmail]/Drafts” - if it is set like that for you, you should be able to see and delete any draft messages from the Drafts mailbox in Gmail on the web.

If it is not set like that - not sure what to do. I might suggest storing the drafts on your Gmail account’s Drafts mailbox, though.

Although I’ve never experienced this exact situation, I suspect it’s like all other gmail deletion issues in that all messages are actually only in the “All Mail” folder. Every other occurrence are simply labels, so when you attempt to delete a message in any other folder, only the label is deleted. Why yours keeps re-occurring is a mystery to me, but if you note the date/time of that message and go to the “All Mail” folder on a browser and delete it there, it should get rid of it everywhere.

As it turns out, the email message is nowhere to be found in Gmail anymore. Not in /Drafts or anywhere else. It shows up now in my main (not gmail) email account (because I previously changed the addresses in an attempt to get it to be delete-able). I tried some new twists to get it to delete the other day — but it just re-appeared this morning. Incredible!!

Can you open the draft in gmail, address it to yourself and send it? Does completing the task eliminate the draft email?

I can no longer open the email in gmail. It doesn’t exist in gmail anymore. However, I have tried sending the email to myself — numerous times. Using my other email address. It keeps returning.

Did you check where drafts were being stored in the account settings? Was it, in fact, already set to the [Gmail]/Drafts folder?

If this was happening to me, I would consider deleting the account and adding it back again. It will just re-download all the mail again from Gmail.

Just checking back in. I have tried every suggestion offered and then some. Nothing works. It’s just unbelievable. I delete the message. Or I send the message…and then delete all traces of it. I’ve changed the To address and the From address. I’ve changed the /Drafts folder location. No matter what. It disappears for awhile. And then…within 48 hours…it returns. I’m ready to give up.

In Mail, settings iOS, look for ‘Follow up Suggestions’. It or an equivalent ‘helper’ in Mail may be bringing back emails that apparently need follow up in Mail’s tiny brain. I kept getting something back despite deleting in a similar manner. Worth a look.

I’ll check, but I am not optimistic. The reason is that it is this one and only this one message that has this symptom. All my other drafts delete just fine. If it was a Settings problem, I assume it would affect all or almost all drafts.

Based on the behavior you’re describing, I’m suspecting a corrupted file. Mail is telling the filesystem to delete it, and something about the file is preventing it from being deleted. So it keeps reappearing every time that mailbox is indexed.

All your Apple Mail messages are stored in ~/Library/Mail. Underneath a complicated cryptic folder structure, all the messages are ultimately stored as .emlx files, which are readable as plain text and/or HTML.

As a last-ditch effort, you might try doing a Spotlight search inside ~/Library/Mail for some distinctive piece of text in the offending message. If you’re able to locate it this way, you can try any number of methods to manually force-delete the file via the Finder or Terminal.

I can’t promise that doing this won’t mess up something, so use this method at your own risk. But it’s something that ought to work when everything else you’ve tried has failed.

Hope this helps.

1 Like

Hey Ted,

This kind of thorny little problem can be enormously frustrating…

Two thoughts:

  1. Vacuum Apple Mail Envelope Index · GitHub
    • You may have to fiddle with this a bit to get it to work on later versions of macOS.
       
  2. I have an AppleScript that opens the selected Apple Mail message in BBEdit.
    • It might be able to find the file on your system.

HTH.

-Chris


--------------------------------------------------------
# Auth: Christopher Stone <scriptmeister@thestoneforge.com>
# dCre: 2012/07/18 05:51
# dMod: 2013/06/25 14:26
# Appl: Mail & BBEdit
# Task: Open selected message's file in BBEdit for editing.
# Libs: Uses only OSX components.
# Test: Lion & Mountain Lion, Mavericks, Yosemite, Sierra
# Tags: @Applescript, @Mail, @BBEdit, @Edit, @Message
--------------------------------------------------------
--» #### { NOTES } #####################################
--------------------------------------------------------
(*

TO-DO:
   • Fix Spotlight Query.
      + Do 2nd query if 1st query fails.

*)
--------------------------------------------------------

try
   
   set AppleScript's text item delimiters to {""}
   
   tell application "Mail"
      set _sel to selection
      if length of _sel = 1 then
         set _msg to item 1 of _sel
      else
         error "Too many messages selected."
      end if
      
      # Use account to find mail-folder in attempt to be compatible back to Snow Leopard.
      set acnt1Dir to (account directory of account 1) as string
      set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
      set mailFolderPath to POSIX path of (text items 1 thru -3 of acnt1Dir as string)
      set AppleScript's text item delimiters to oldTIDS
      tell _msg
         set mbxName to name of its mailbox
         set mID to its id
         set mSub to its subject
      end tell
   end tell
   
   # Escape single quotes in subject for spotlight query string.
   if mSub contains "'" then
      set mSub to REPL(mSub, "'", "'\"'\"'")
   end if
   
   # Find email 
   set _cmd to "mdfind -onlyin " & mailFolderPath & " 'kMDItemDisplayName == \"" & mSub & "\"cd && kMDItemFSName == \"" & mID & ".emlx\"cd'"
   
   --» •••• Debug Code ••••
   # textToBBEdit(_cmd)
   # return
   
   set emlFile to do shell script _cmd
   if emlFile ≠ "" then
      textToBBEdit(emlFile)
   else
      error "No message was returned by Spotlight!"
   end if
   
on error e number n
   set e to e & return & return & "Num: " & n
   tell me to set dDlg to display dialog e with title "ERROR!" buttons {"Cancel", "Copy", "OK"} default button "OK"
   if button returned of dDlg = "Copy" then set the clipboard to e
end try

--------------------------------------------------------
--» HANDLERS
--------------------------------------------------------
on REPL(_str, _find, _repl)
   set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, _find}
   set _str to text items of _str
   set AppleScript's text item delimiters to _repl
   set _str to _str as text
   set AppleScript's text item delimiters to oldTIDS
   return _str
end REPL
--------------------------------------------------------
on textToBBEdit(_data)
   if _data starts with "/" then
      try
         set _data to alias POSIX file _data
      end try
   end if
   
   tell application "BBEdit"
      activate
      if class of _data = alias then
         open _data
      else if class of _data = text then
         set newDoc to make new document with properties {text:_data}
      end if
      set bounds of front window to {303, 44, 1617, 1196}
   end tell
end textToBBEdit
--------------------------------------------------------
3 Likes

Yeah, I think rebuilding the Mail index is the way to go here. Something’s stuck in there.

As it turns out, I believe I finally fixed the problem. But I no longer recall exactly how. I kept changing which of my emails I used as the From address and then changed to various To addresses. I would then send the message and delete every trace of it afterwards. This never worked in any previous tries. But whatever I did on my most recent try has appeared to work. Unfortunately, by the time (days later) that I realized the message was not returning again, I no longer could recall exactly what I had done. :slight_smile: