Long story short, I created a new gmail account, and linked several other accounts to it (each with 1000s of messages), which I am importing. All imported messages arrive as unread, but I need them to appear as read.
I have a little experience with python, but I've only used mail and imaplib modules for sending mail, not processing accounts.
Is there a way to bulk process all items in an inbox, and simply mark messages older than a specified date as read?
Rather than try to parse our HTML why not just use the IMAP interface? Hook it up to a standard mail client and then just sort by date and mark whichever ones you want as read.
Parse Gmail with Python and mark all older than date as "read"