imaplib fetch message flags
Rich Healey
healey.rich at gmail.com
Sun Mar 1 23:14:39 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rich Healey wrote:
> 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
Found my own solution.
Anyone interested I found the info I needed on:
http://www.devshed.com/c/a/Python/Python-Email-Libraries-part-2-IMAP/3/
- --
Rich Healey - iTReign \ .''`. / healey.rich at gmail.com
Developer / Systems Admin \ : :' : / healey.rich at itreign.com
AIM: richohealey33 \ `. `' / richo at psych0tik.net
MSN: bitchohealey at hotmail.com \ `- / richohealey at hellboundhackers.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmrXS8ACgkQLeTfO4yBSAdoYwCfU2UWL3mseIz/kQIUXWCxyBAc
ExkAoL0WYh7uu7A3cFP/bmjFONviAFgh
=mCa4
-----END PGP SIGNATURE-----
More information about the Python-list
mailing list