imaplib fetch message flags

Discussion in 'Python' started by Rich Healey, Mar 2, 2009.

  1. Rich Healey

    Rich Healey Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Hi List,

    I'm using an example of an imap client I found with google as a
    framework for a more fullfeatured imap client.

    They use the line:

    f = self.M.fetch(num, '(BODY[HEADER.FIELDS (SUBJECT FROM)])')

    To retrieve the Subject: and From: fields from the message. I'm curious
    about how to get the imap flags attached to the message, I can't find
    this anywhere. The documentation suggests that it's merely some flag as
    part of the `message_parts' argument to IMAP4{,_SSL}.fetch() method, but
    what I cannot find. I've tried
    (BODY[HEADER.FIELDS (SUBJECT FROM FLAGS)])
    but it doesn't have the desired result.

    I'm sure I'm missing something obvious.

    Thanks in advance

    Richo
    - --
    Rich Healey - iTReign \ .''`. /
    Developer / Systems Admin \ : :' : /
    AIM: richohealey33 \ `. `' /
    MSN: \ `- /
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (MingW32)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iEYEARECAAYFAkmrWBwACgkQLeTfO4yBSAepWACdHufITez2lL78KgRY9D/WUN9y
    V3UAn12rdLxG6nKv1mfIxUeSywpEQk94
    =RLfw
    -----END PGP SIGNATURE-----
    Rich Healey, Mar 2, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill Sneddon

    Deleting email message using imaplib?

    Bill Sneddon, Aug 25, 2003, in forum: Python
    Replies:
    2
    Views:
    800
    Bill Sneddon
    Aug 25, 2003
  2. Max M
    Replies:
    2
    Views:
    2,366
    Donn Cave
    Nov 18, 2004
  3. Jp Calderone
    Replies:
    1
    Views:
    332
    Max M
    Nov 19, 2004
  4. Steve Holden
    Replies:
    0
    Views:
    775
    Steve Holden
    Feb 8, 2009
  5. Gabriel Genellina

    Re: imaplib fetch message flags

    Gabriel Genellina, Mar 2, 2009, in forum: Python
    Replies:
    1
    Views:
    1,166
    Lawrence D'Oliveiro
    Mar 2, 2009
Loading...

Share This Page