Newbie imap lib question

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Fri Jan 12 21:27:47 CET 2007


jrpfinch schreef:
> I have three messages in my inbox.  Why does messageCount =
> gServer.select('INBOX') not just return OK and 3.  See below for
> examples - seems to be completely random how many threes it returns.
> The documentation for imaplib seems sparse.  Does anybody have any good
> links?  Many thanks, Jon
> 
> messageCount =
>  0 : OK
>  1 : ['3']
> messageCount =
>  0 : OK
>  1 : ['3', '3', '3']
> messageCount =
>  0 : OK
>  1 : [None]
> messageCount =
>  0 : OK
>  1 : ['3', '3']

I'm afraid I can't help you: all I can say is that it works for my. It 
gives consistent results each time I run it.

 >>> import imaplib
 >>> M = imaplib.IMAP4('...')
 >>> M.login('...', '...')
('OK', ['User logged in'])
 >>> M.select('INBOX')
('OK', ['740'])

Always the same. Though the number changes if I receive or delete mail 
of course.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Python-list mailing list