> Can anyone tell me how to get a message's number from the message-id > using IMAP4.search? > I've tried this: > resp, items = server.search(None, 'HEADER', > '"Message-id"', msgID) but it gives me a 'bogus search criteria' error
>>> import imaplib >>> i = imaplib.IMAP4("mail.example.com") >>> i.login("username", "password") [...] >>> i.select() [...] >>> i.search(None, '(HEADER Message-ID "<[EMAIL PROTECTED]>")') ('OK', ['4']) >>> i.logout() [...] =Tony.Meyer -- http://mail.python.org/mailman/listinfo/python-list