-
01-31-2009, 08:49 AM #1
REQ: Mod to mark all mail as read
ok, i don't know about you guys but i'm completely sick of having to mark 1 by 1 all the emails to either delete or mark as read, specially when something happens with the phone that i have to start from scratch and download over 1.5k emails on 4 accounts
is there a mod or app out there that will do it? can it be done?
thanks
-
02-01-2009, 09:59 AM #2
Shouldn't be too hard...I'll get on it
Ok, this will require an SSH connection:
1) SSH into your device
2) Run the following commands:
3) Reboot your iPhoneCode:sqlite3 /private/var/mobile/Library/Mail/Envelope Index "update messages set flags = flags + 1 where flags&1 = 0;" sqlite3 /private/var/mobile/Library/Mail/Envelope Index "update mailboxes set unread_count = 0;"
This will mark all messages in the iPhone's mailbox as read.Last edited by jdas; 02-01-2009 at 09:59 AM. Reason: Automerged Doublepost
-
The Following User Says Thank You to jdas For This Useful Post:
-Blue- (02-02-2009)
-
02-02-2009, 02:00 AM #3
thanks, but how do i run a command?
do i do it from the terminal or from winscp?
thanks again
ok this is what i got.. i did a copy paste from what you wrote..
not sure what i did wrong.. at least i figured out the commands part lolCode:/$ sqlite3 /private/var/mobile/Library/Mail/Envelope Index "update messages set flags = flags + 1 where flags&1 = 0;" SQL error: near "Index": syntax error /$ sqlite3 /private/var/mobile/Library/Mail/Envelope Index "update mailboxes set unread_count = 0;" SQL error: near "Index": syntax error
Last edited by -Blue-; 02-02-2009 at 08:53 AM.
-
02-03-2009, 08:09 PM #4
Oops...run these instead
Code:sqlite3 "/private/var/mobile/Library/Mail/Envelope Index" "update messages set flags = flags + 1 where flags&1 = 0;" sqlite3 "/private/var/mobile/Library/Mail/Envelope Index" "update mailboxes set unread_count = 0;"
-
-
02-04-2009, 02:38 AM #5
yay it worked.. thanks
now hopefully someone will turn this into a mini app or something
-
02-04-2009, 11:20 AM #6Retired Moderator
- Join Date
- Sep 2007
- Location
- Southeastern Pennsylvania
- Posts
- 2,533
- Thanks
- 93
- Thanked 362 Times in 273 Posts
I loved iDeleteMail on the old 1.1.x firmwares. Wish there was something similar. While its nice to have the command line workaround, having it as an app is better.

If I've helped you, you can help me by clicking on that Thanks button.
iPhone, the Swiss Army knife of the 21st Century.
-
02-04-2009, 02:57 PM #7
yeah, a select all or delete all would also be great.. an app that includes or adds to the mail app the options of.. read all, delete all, select all, would be great
-
03-04-2009, 11:12 AM #8
A note on the code above, you don't have to reboot or respring the phone for the counts to reset. Just kill the "MobileMail" app. The app will automatically reload, and when it does the counts will be reset.
Just be sure you are not in the middle of composing an important email!Code:killall MobileMail

I'm looking for ways to automate this process, it's easy to get it into a script. But getting it to an app/icon is a bit harder.
Thanks jdas for the SQL code!!
-
03-18-2009, 10:04 AM #9
New App!
Ok I have the script above made into an application. But there are a couple of caveats.
1. You have to have SSH enabled on your phone. If you disable the SSH service the app will not work.
2. The app will terminate the mail app, so if you are in the middle of composing an email it will be lost.
3. If using exchange, this will not mark the messages read on your exchange server. It will mark the messages read on the phone, but the mark will not sync back to the server.
Download the app here: markall.tar.gz
Just place the tar file in the /Applications folder and extract, then reboot or respring.
When you run the app it will show a black screen then return to the springboard. Wait about 1-2 seconds and the mail unread count will clear.
Hope this app helps, I use it all the time!
-
05-26-2009, 03:15 PM #10
hmm, the markall.app doesnt work for me, I SSH'd into my phone and tried untarring the file but winscp said it wasnt a valid gzip compression or something. So I untarred the file on my desktop and just copied over the markall.app to my applications folder, then set permissions to 775 and rebooted my iphone. The markall.app appears and it launches but the message count doesnt go down

edit: i made sure ssh was enabled, does this only work on POP3 accounts? because I have IMAP e-mail accounts.
edit 2: i followed this guide (http://www.modmyi.com/forums/native-...inscp-ssh.html) and set permissions back to 755 and clicked on recursive, rebooted and it worked! thanks so much!Last edited by fade; 05-26-2009 at 03:25 PM.
-
09-22-2009, 01:56 PM #11
I followed the instructions here and it still does not work for me. When I tap the icon, the screen goes blank for a split second and the mail.app terminates, but when I respring or reboot or anything the count has not gone down. Is there any program for this that really works? I'm on 3.0.1 3GS.
-
09-22-2009, 05:54 PM #12
Jjhack, for a new member u know a ton. Thanks or the useful tips.
-
09-30-2009, 02:31 PM #13
Link to markall.app
Anyone got a different link to the markall.app??.....after extracting the 4kb linked file all I get is a blank folder entitled markall. Any ideas, really sick of seeing a hundreds of "unread emails" that I've already read on my comp.
Thanks
-
10-17-2009, 02:34 PM #14
Update for 3.1.2?
The markall.app is a great idea. However, having trouble making it work with 3.1.2. The app executes, but doesn't mark mail as read. In fact, it has the opposite effect. If I manually mark a mail as read, then run the markall.app, it actually sets it back to unread. Anyone have any suggestions? Is there something different in 3.1.2 that might cause this?
-
11-22-2009, 11:25 AM #15
Hi,
first of all, thanks a lot for this great small app.
But maybe someone can answer me to questions:
1. After kill MobileMail how can i restart it? Because i think the next step is always to click on the button. But it should be automated.
2. Can you tell me a method to delete all mails in MobileMail?
Thanks a lot for the help.
Cu kami23
-
11-22-2009, 01:10 PM #16
I'm running Snow Leopard on my MacBook Pro and can't seem to uncompress the markall.tar.gz properly.....I've tried Stuffit, GuiTar, unarchiver, etc.....GuiTar ends up just giving me an empty folder entitled "markall".
So, does anyone have a link to the markall.app file already extracted or able to email me at my spam address bouldercodude@yahoo??? if you can email please respond so I get an email to my real address and know to check my spam account.
Thanks
-
04-16-2010, 12:28 PM #17
[ame=http://www.youtube.com/watch?v=9UUfzqSPnsc]YouTube - popMark.mov[/ame]
-
05-13-2010, 01:53 PM #18Green Apple
- Join Date
- Nov 2008
- Location
- New York, NY
- Posts
- 44
- Thanks
- 29
- Thanked 15 Times in 10 Posts
Hello,
Where exactly can I find this popMark app? It's not in Cydia or the app store. I need it ASAP,
Thanks!
-Ted.
-
05-14-2010, 08:27 AM #19
-
05-14-2010, 01:26 PM #20
Hi Guys,
I still have yet to package it properly with its dependancies.
I thought they were going to fix this in OS4 so I hadn't worked on it since I produced the video.



LinkBack URL
About LinkBacks
Reply With Quote
