Programmatically setting message state (Read/Unread)

Hi,
I understand that Apple doesn't seem to care about people with more than just 1 POP account each with many messages. So to tackle that, I wanted to at least write a script or something to set my 600 unread messages as "read" between my 8 POP accounts. I can't find a sqlite db or any other place for that matter were these messages are stored. I was wondering if anybody knows how apple keeps track of what's read and what's not so I can modify it.
thanks in advance for your reply
A.
=========================
More About Me and What I tried.
=========================
New to iPhone and programming for it (just traded in my curve for this 3G thing)
running 2.1
did a `cd \ && find . -name "*.sqllitedb"` but ironically found every other db for sms and stuff except the one I need (for mail)
cd'ed into the mail folder but found a few RFC format emails (not 600 of them) -- when did `ls -lrt`, found that these files are too small to have anything (maybe i'm looking at the wrong thing).

I just had some time to look at this further and figured out the solution. Here it is for the next guy who is interested.
The sqlite db for your messages (and their unread count) is "Envelope Index" inside /private/var/mobile/Library/Mail/
run ".schema messages" and look at the triggers. That will tell you what sql statement to run. I'll 'try' to make this into an application||script if I get time, and share it later on Cydia but for now, the above solution is here for the next guy.
*simple how to:*
there's a bit column for [messages] called [read], update and set to 1
there's a int column for [mailboxes] called [unread_count], set to 0
reboot device and run the mail once, then go back to Home (all your messages are read now)

Similar Messages

  • Hotmail read/unread messages

    Hello all,
    Very please my iphone can now cope with hotmail, but the fetching doesn't seem to deal with knowing which messages are read/unread in my main inbox, and messages I read on my iphone aren't marked as such when I log in via a web browsed (i.e. normally) to hotmail... any help?

    Get an email service that offers free imap support, or upgrade to the paid hotmail to get imap support.

  • Programmatically selecting hovered state of item renderer - Greg pleeease

    I'm a bit new to Flex, so I have the idea but can't get it to work.
    I'm using an item renderer that takes its data from an HTTPService
        <s:SkinnableDataContainer
                                  dataProvider="{boData}"
                                  itemRenderer="extras.BoItemRenderer"
                                  skinClass="extras.BoSkin" />
    the boData data provider is an ArrayCollection not an Array
    In my <s:ItemRenderer ...... > (BoItemRenderer.mxml)  I have
    - 2 states: normal and hovered (each has different style, which I will leave out to keep things simple)
    - and the data is presented as follows:
        <s:HGroup>
            <s:Label text="{data.idNum}" />         
            <s:Label text="{data.firstName}" />
            <s:Label text="{data.lastName}" />
        </s:HGroup>
    Naturally as I hover on any row in the item renderer, it changes to the hovered state styling, all done by flex.
    What I want to do however is programmatically induce that hover state without actually hovering.
    For example, given a hard-coded idNum, I need to programmatically set the state of that row to hovered.
    My approach is as follows, but not sure how to target that specific item,
    - search the dataProvider to find the index of the row with idNum that matches my hard-coded value. I looked at the documentation, and there is indexOf, but it's for Array and not ArrayCollection.. also not sure how that works since I'd like to read the data from the item renderer directly, not from the original data provider.
    - then I would find that index in the itemrenderer and set the state of that index to hovered.
    Simpler said then done, but I'm stuck on it...
    Thanks,
    David

    Depending on what is it the ArrayCollection, in theory you might be able to do this:
    var myIndex:uint;
    for(var a:uint=0;a<myCollection.length;a++){
        if(myCollection.getItemAt(a).idNum == myHardCodedIdNum){
            myIndex = a;
            break;
    You can programmatically simulate a hover over by having the component manually dispatch a mouseOver event, but this is not the way to do it with itemRenderers.
    Item renderers can be tricky, particularly if they are being used in List based controls, like List, DataGrid, TileList, etc. because the itemRenderers are recycled.
    With that in mind, and with your somewhat non-typical situation (manually simulating hover over), I might be wrong on this, but it might be best to control this via the dataProvider data. So have a field named currState, and somehow make the renderer automatically change its state if that data field changes, then you simply programmatically change the currState data field for the desired item.
    As far as how to change the state of the item renderer based on changes to a data field, maybe ChangeWatcher?
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • Apple IMAP flagging unread messages as read

    i'm experiencing a very frustrating problem that i can't seem to find an answer to. i'm using IMAP mail on three devices - a 24" imac, i7 15" macbook pro and iphone 3GS. all accounts are set up the same, as best i can tell (the iphone doesn't quite let you go as deep into the advanced settings).
    some of my emails come in as "unread" and others (the majority) come in as "read" which is for obvious reasons problematic. i can't seem to find a pattern or reason this would be occurring. sometimes i'll only have one device on, and they still come through as read.
    i really don't want to go back to POP mail, but i can't seem to figure this out. any help would be really appreciated.

    That is a pretty broad statement, considering with any IMAP account, it is the server that marks a message as Read, albeit upon communication with the device and app that did the reading. The Inbox resides on the server with an IMAP account, and not on any device accessing it. I am not saying it is the fault of the server, but the server must be involved.
    I don't use a smart phone to access them, but I have IMAP accounts, hosted for my domain, that are accessed by multiple computers, and which work correctly.
    Can you set up additional email accounts with this domain, which are not accessed by the smart phone?
    Ernie

  • HT2497 I just purchased the 2TB TC and set it up on bridge mode to my att verse which is connected via ethernet cable.  The TC is continually blinking amber and an error message states that a wireless network cannot be found but the uverse is functioning

    I just purchased the 2TB TC and set it up on bridge mode to my att verse which is connected via ethernet cable.  The TC is continually blinking amber and an error message states that a wireless network cannot be found but the uverse is functioning great.  The network name I assigned to the TC is also not appearing among available networks.  How do I remedy this, please?

    What OS on the computer you are using to setup the TC?
    Did you turn on ipv6 for wireless to link-local... this is essential for network access now??
    Try power cycling the network.. start up in correct order.. uverse.. 2min wait.. TC.. 2min wait.. computer.
    No luck factory reset and start over. Use ethernet cable as well to the computer to help it.
    No luck I can show you manual method.

  • Unread messages becoming 'read' before reading!

    We're having an issue with a BlackBerry Z10 where messages come in marked as 'unread' (i.e. bold text with the yellow envelope) and then after a while (not sure exactly how long), they become 'read', even when they haven't been opened.
    Obviously this makes it tricky to make sure that all messages are read.
    Is there a setting that needs to be changed, or is this some kind of glitch?
    Any advice welcome!
    Solved!
    Go to Solution.

    Your email server is mistakenly marking them as read.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to programmatically set an error message for a validation rule of an EO

    Hello,
    Is there a way to programmatically set an error message when validating any data on an EO?
    It seems the API of the EO interface does not have any method to be defined for my needs..
    thanks

    The other option is that for the error message you can define a groovy expression to call an EO method.
    I documented this on my blog
    http://blogs.oracle.com/grantronald/entry/dynamic_error_messages_from_a
    Regards
    Grant

  • Fetch unread RSS items from mail, set them to read, save the text to a file

    This is what I want to do, and needless to say I am having a little trouble.
    I wish to take the unread mail RSS items, set them to read, and then save the TEXT of the articles (not the title, time, or author) to a TextEdit file in my Documents folder.
    So far I have Get Feeds From Mail > Filter Articles > Get Text from Articles > New Text File
    This is all fine and dandy, but how do I just get the TEXT and not all of the crap that comes with it?
    Thanks!

    NOw I had manage to clear out the error, but now the problem is when I click on the 'save' button, this function clear out the entire text file for me !!!
    The code are as below:
           if(e.getSource()== vButtons[0])
              try{
               String str;
               String Ky = tArea.getText();
               BufferedWriter buffWrite=null;
               BufferedWriter in1 = new BufferedWriter(new FileWriter("Keyword.txt"));
                        buffWrite.write(Ky);
                    buffWrite.flush();
                        buffWrite.close();
                    in1.close();
              catch (IOException ex) {
              ex.printStackTrace();
            if(e.getSource()== vButtons[1])
                  new panel();
                  dispose();
             if(e.getSource()== vButtons[2])
                System.exit(0);           
        }     Please tell me how to save the TextArea to the text file, THANKS !!!

  • Determine the read/unread status of a message in a users inbox

    Is there any way to see the current status of a read/unread message attribute. The email is confidential and the user is not supposed to see it. The sender wants assurance that the email was not read. He wont accept a screen shot as the email could always
    be marked as unread.  I have tried MSMAPI but the attribute doesn't seem to be listed, though I cant determine the Hex code meaning. Thanks for any leads.

    "read"
    is just a flag on the message (PR_MESSAGE_FLAGS), it can be changed and it cannot guarantee you if the message was actually read. Confidential mail should be encrypted or IRM-protected, so you can blame the sender as much as the recipient.

  • PhotoshopCS6 file is not longer working, error message reads unreadable

    PhotoshopCS6 file is not longer working, error message reads unreadable. PLEASE  HELP!!!!!! I've spent so many hours, the copied that I do have are in JPEG. and  PNG and they arnt as clear.

    And what exactly? You have neitehr provided proper system info nor the exact error message nor told us anything about your documents. If you are referring to PSD files suddenly registering as damaged, you might wanna check the forum. This has been discussed quite a bit. and of course you might want to read some primer on the big Internet why people use versioning/ incremental saves and backups to avoid critical files being lost...
    Mylenium

  • API to set the Message State

    Hi,
    is it possible to set the PI Message State to Application Error in Message Mapping or/and in Adapter Modul ?
    best regards,
    Hai

    Hi,
    in case you want to get the whole soap fault message (do not use soap evelope) and handel it youself. You may want to set it to application fault and forward the fault message to caller.
    regards,
    Hai

  • I have 2 unread messages in Mail badge area, but all messages are read.

    I have two messages that show unread in Mail, but, all my messages are read.  I tried to sort by unread messages, but, it doesn't show any unread messages.  This is an Exchange mailbox so I tried to rebuild it, but, that didn't work.  Any idea why I would have a badge with 2 unread messages.  I have also checked all subfolders and they do not have any read messages. 
    Attached is a simple screen shot.

    Thanks, Ernie—
    Two accounts. No third-party apps. I see a little red starburst (spiky ball with a white number within) in the Dock. Says 11. But I can't find any unread messages. But I should have mentioned that my "Drafts" folder shows a five. Is this a new thing with Leopard? I don't think Mail used to count Drafts in Tiger. Could those be contributing to the 11? Still can't find the other six...
    I'll try rebuilding the mailboxes and see if that helps.
    Best,
    M.

  • Read POP messages marked as unread

    Shouldn't Mail know when a message retrieved from a POP server has been flagged by the server as read? I access the POP account from several different locations and don't want to read through messages I've already read at work. Eudora seemed to manage this fine....

    I'm not sure how Eudora does this since the inbox mailbox for a POP account is not synchronized with the server.
    New messages available and that remain at the incoming mail server for a POP account not yet downloaded by the email client being used to access the account will be downloaded. If another email client is used to access the same POP account, and messages downloaded by the other email client are read with that email client, the read/unread status for the messages with the email client used is not communicated or synchronized with the server.
    This is a function and feature of an IMAP account, not a POP account.

  • Cannot resize the message 'read/unread' column in leopard mail.

    I cannot seem to resize the message 'read/unread' column in leopard mail. All other columns (from, subject, date received, size etc) can be resized as normal, however the read/unread "blue dots" are taking up an inordinate amount of space and will not for the life of me resize!
    it is driving me crazy...is this a leopard bug or am I just doing something wrong? thank you very much.

    I cannot seem to resize the message 'read/unread' column in leopard mail. All other columns (from, subject, date received, size etc) can be resized as normal, however the read/unread "blue dots" are taking up an inordinate amount of space and will not for the life of me resize!
    it is driving me crazy...is this a leopard bug or am I just doing something wrong? thank you very much.

  • If UseMessageListener in JMS adapter set True, causing the message state 0

    We have a multi node SOA 10g deployed. If we have a UseMessageListener=True, the state of the message is not changing from 0 to 2. Even though the message was consumed.
    Same, configuration works fine in lower environment with single node.
    When we changed UseMessageListener= false, message state started getting changed even in multi node architecture.
    One more difference that we have in multinode and single node environment, is that we are having isTransacted mcf property value as false. Where as in single node is Transacted is true.
    Can some one explain some reasoning behind such behavior?
    What is the significance of UseMessageListener?

    Hi Tarak,
    The behaviour looks acceptable for me... Topics are different than queues, if you publish a message to a queue and there is no suitable consumer at that moment the message will remain in the queue... But for a topic, looks acceptable for me to say that if you publish a message and there was no suitable subscriber at the moment the message can be discarded... The message was checked for all durable subscribers and there was no one to able to pick it up... So it can be safely discarded... If later you change your durable subscriber to a situation on what the previous message could be picked up, that may be too late... Nevertheless, that's a very particular case and may vary according to implementation...
    May you can confirm the behaviour by checking the messages assigned to a durable subscriber... When you publish a message that doesn't match the selector, will the message even be listed at all?
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e13952/taskhelp/jms_modules/topics/ManageDurableSubscribers.html
    Hope this helps...
    Cheers,
    Vlad

Maybe you are looking for