Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

r0k

macrumors 68040
Original poster
Mar 3, 2008
3,612
76
Detroit
I just switched from Blackberry to iPhone. On my Blackberry, if I wanted to mark my email read, it was a simple matter of selecting multiple messages and picking "mark read".

On my iPod Touch, I knew this was missing but it didn't bother me so much because I use IMAP with MobileMe so if I check my email on my iPad, it shows up as read on my iPhone. But I also have a pop account set up and for that one, the procedure is somewhat clunky...

1. Jailbreak my iPhone
2. Install ssh
3. Run the following sql script...
Code:
   1. sqlite> .schema mailboxes  
   2. CREATE TABLE mailboxes (ROWID INTEGER PRIMARY KEY,  
   3.                         url UNIQUE,  
   4.                         sequence_identifier TEXT,  
   5.                         total_count INTEGER DEFAULT 0,  
   6.                         unread_count INTEGER DEFAULT 0,  
   7.                         deleted_count INTEGER DEFAULT 0);  
   8. sqlite> .schema messages  
   9. CREATE TABLE messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT,  
  10.                        remote_id INTEGER, sender,  
  11.                        subject,  
  12.                        _to,  
  13.                        cc,  
  14.                        date_sent INTEGER,  
  15.                        date_received INTEGER,  
  16.                        sort_order INTEGER,  
  17.                        mailbox INTEGER,  
  18.                        remote_mailbox INTEGER,  
  19.                        original_mailbox INTEGER,  
  20.                        flags INTEGER,  
  21.                        read,  
  22.                        flagged,  
  23.                        deleted,  
  24.                        size INTEGER,  
  25.                        color,  
  26.                        encoding,  
  27.                        content_type);  
  28. CREATE INDEX date_index ON messages(date_received);  
  29. CREATE INDEX message_mailbox_index ON messages(mailbox, deleted, date_received DESC, sort_order DESC);  
  30. CREATE INDEX message_remote_mailbox_index ON messages(remote_mailbox, remote_id);  
  31. CREATE TRIGGER after_add_message AFTER INSERT ON messages  
  32.   BEGIN  
  33.     UPDATE mailboxes SET total_count = total_count + 1 WHERE mailboxes.ROWID = new.mailbox;  
  34.     UPDATE mailboxes SET unread_count = unread_count + 1 WHERE mailboxes.ROWID = new.mailbox AND new.flags&1 = 0;  
  35.     UPDATE mailboxes SET deleted_count = deleted_count + 1 WHERE mailboxes.ROWID = new.mailbox AND new.flags&2 > 0;  
  36.   END;  
  37. CREATE TRIGGER after_delete_message AFTER DELETE ON messages  
  38.   BEGIN  
  39.     DELETE FROM threads WHERE threads.message_id == OLD.ROWID;  
  40.     DELETE FROM message_data WHERE message_id = OLD.ROWID;  
  41.   
  42.     UPDATE mailboxes SET total_count = total_count - 1 WHERE mailboxes.ROWID = old.mailbox;  
  43.     UPDATE mailboxes SET unread_count = unread_count - 1 WHERE mailboxes.ROWID = old.mailbox AND old.flags&1 = 0;  
  44.     UPDATE mailboxes SET deleted_count = deleted_count - 1 WHERE mailboxes.ROWID = old.mailbox AND old.flags&2 > 0;  
  45.   END;  
  46. CREATE TRIGGER after_update_message AFTER UPDATE ON messages  
  47.   BEGIN  
  48.     UPDATE mailboxes SET unread_count = unread_count - 1 WHERE mailboxes.ROWID = new.mailbox AND old.flags&1 = 0 AND new.flags&1 > 0;  
  49.     UPDATE mailboxes SET unread_count = unread_count + 1 WHERE mailboxes.ROWID = new.mailbox AND old.flags&1 > 0 AND new.flags&1 = 0;  
  50.     UPDATE mailboxes SET deleted_count = deleted_count - 1 WHERE mailboxes.ROWID = new.mailbox AND old.flags&2 > 0 AND new.flags&2 = 0;  
  51.     UPDATE mailboxes SET deleted_count = deleted_count + 1 WHERE mailboxes.ROWID = new.mailbox AND old.flags&2 = 0 AND new.flags&2 > 0;  
  52.   END;

You gotta be kidding me, right? Well this isn't nearly enough to send me screaming back to the Apple store yelling "Take this POS back!", but I gotta admit that when naysayers call the iPhone a toy, it is basic stuff like this that makes me scratch my head and wonder what Apple developers could possibly be thinking. I'm on the low cost data tier with At&t. This means I never want to check email when I'm away from wifi unless it's an emergency. I have my email set to "push" for MoMe and eat that data use but I really don't want to have to click message by message, causing graphics to load and eat data, to get messages marked read on my pop3 based account. BTW I have an iPhone 4 with the latest OS so I have the unified inbox and still they left this feature out... :rolleyes:
 
Here is the solution

http://m.lifehacker.com/5916375/how-to-mark-all-emails-as-read-on-your-iphone-with-one-simple-trick
 
This was a thread from 2010. Since then (or maybe before too), we've been easily able to mark multiple messages as read in iOS (tapping "Edit" in the top right of the screen, then selecting the emails, and then select "Mark" at the bottom).

He's talking about marking ALL emails in a folder as read ... regardless of some unreads NOT being sequential. Say you have a folder with 500 emails with: 1, 250, 233, and 397, 398, 465 #'d emails as Unread. Your method you'd have to scroll until you select them ALL. This method you do NOT have to.

btw, still works in iOS6 Beta 2; just tried it.

Mail needs a serious revamp of more powerful functionality!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.