Ruby Imap foo

How to tell if a message has been read or not with ruby net/imap

flags=imap.uid_fetch(uid,'FLAGS')[0].attr["FLAGS"]
seen=true if flags.include? :Seen || false

Spent a while looking for that one, and well, I learned the hard way : Stop googling and read the code

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>