Can't delete e-mail > they keep reappearing!

Colin

New Member
Bronze
Dec 25, 2007
449
0
0
#1
Weird problem. I have a few instant notification messages from forums that won't delete. The messages do not show any information, only: (No sender) and (no subject) in the message title. I know which forum it is from because the first few lines are displayed. I've turned off message forwarding, and deleted them from my server.

When I delete the message, it moves to the trash, then a new one appears with exactly the same information in the title etc. only the date stamp is updated. There are 4 of these that won't go away. A copy of the message goes to the trash but the new ones are in the 'in box'

Once in the trash, I can delete them BUT there is another message that won'd delete from the trash!? I've powered off and powered on and no change. Any thoughts?
 

Colin

New Member
Bronze
Dec 25, 2007
449
0
0
#3
It's just a regular POP server from my website host. Also, server side things probably wouldn't explain why I can't delete the mail from the trash?
 

Colin

New Member
Bronze
Dec 25, 2007
449
0
0
#5
FWIW, I did a hard reset (sleep+home) and there is no change.

It sucks to see 4 new messages showing all the time!
 

Buffy

Zealot
Gold
Jan 20, 2008
2,216
3
36
#7
This happens to me as well. I've never really been too bothered by it; when I delete the messages off my main account from my computer and then delete them from my phone, they go away.
 

Colin

New Member
Bronze
Dec 25, 2007
449
0
0
#8
Ok I deleted the e-mail account and all the messages disappeared. When I reinstalled the account I now have 6 messages showing that won't delete, and 4 in the trash that won't go away!
 

Colin

New Member
Bronze
Dec 25, 2007
449
0
0
#9
More info, when you click the message header, it takes you to the message page but it never loads. I have the little spinning icon saying loading....
 

Colin

New Member
Bronze
Dec 25, 2007
449
0
0
#11
I ended up restoring the entire phone. This solved the issue and although a pain, it was mostly inconvenient. Thanks for the suggestions.
 

rawdmon

New Member
Mar 26, 2008
2
0
0
#12
I had the same problem and found an easy way to fix it. This only works if your iPhone is jailbroken and you are able to login to it via SSH.

1. Login via SSH (as root).
2. Issue the command: rm /private/var/mobile/Library/Mail/Envelope\ Index

That will remove the Envelope Index database (it is a MySQL lite database). I originally tried going in to the database itself to delete the offending message but this did not work. After removing the database the Mail app pulled down the emails in my Inbox again and automatically created a new database. This resolved the issue.

In short, the issue itself is caused by items being in the database when they are no longer on the mailserver. If Apple isn't planning on fixing the code that causes this issue to begin with, it would be lovely if they'd add an option to the mail settings which allows you to flush the database and start fresh (to resolve issues such as this when they arise).
 

rawdmon

New Member
Mar 26, 2008
2
0
0
#14
WOW! Your first post and it is to a thread that is two and a half years old. At least you were trying to help.
I was well aware that the thread is 2 years old. I replied because this is still an issue that people run in to. I also replied as this thread shows up in the top 3 google results when searching for "iPhone emails won't delete" or "iPhone emails can't delete" and other similar variations. It took me a while to figure out the fix and I have advanced experience with unix commandline. I figured I'd post the fix to avoid other people having to dig for a solution and potentially not find any.