http://www.perlmonks.org?node_id=1025707

Frankosun has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, does some body have experiences or idea how to use some IMAP perl module to get informations regarding email messages and it`s flags. I need to find out if the messages in certain inbox folders have been flagged as "complete". For better understanding: In MS outlook there is possibility to mark email message using the flag "Mark as complete" and the checker icon is shown next to the marked email message. I need to use perl script to select all messages from inbox and find out which message has this flag. Does somebody have an idea if it is possible to do it using perl and how? Thank you.

Replies are listed 'Best First'.
Re: Get certain email message flag using IMAP module
by mje (Curate) on Mar 27, 2013 at 16:08 UTC

    I use Net::IMAP::Client to access IMAP mail boxes programmatically and it seems to work well. You can the flags on any message with the get_flags method.

      Thank you for your reply. I have tried it, but i never seen that the flag has been changed within message which i have marked by outlook as completed. The message has always \seen flag, but not any different. Do you know what is the name of the flag for that action" Mark as complete".? Thanks.

        No idea, I don't use Outlook. Can't you just look at a message before it is marked as complete and get the flags then look at it again after marked as complete to see what additional flag it has.

        Hi,

        There is a MailItem.UnRead Property which Returns or sets a Boolean value that is True if the Outlook item has not been opened (read). Read/write.

        J.C.

Re: Get certain email message flag using IMAP module
by hdb (Monsignor) on Mar 27, 2013 at 15:31 UTC
      Thanks a lot for your advice. I will check it and let you know if it helped me.