Closed graingerkid closed 9 years ago
Hi, I've just pushed example which demonstrates exactly what you've asked for: https://github.com/vladimarius/imapy/blob/master/examples/email_operations.py
Email object contains 'header' field where you can get all required headers. So to get email headers you do something like:
emails = box.folder('Blabla').emails(..query..) headers = emails[0]['headers'] print(headers['Message-Id'][0])
Thanks mate :+1:
I actually get the following when running this, any idea why? (sorry, obviously trying to figure out the library)
AttributeError: 'NoneType' object has no attribute 'group'
Is this error happening in imapy 1.0.2 ? Please run imapy with following additional parameter: box = imapy.connect( host=host, username=username, password=password, ssl=ssl, debug_level=4, # <----- )
And please drop me your log with sensitive information stripped out. Here or to my email at vladimarius # gmail.com
I suppose this is happening in email message parser which encounters errors while parsing some emails.
Dropped you an email, mate, let me know if you need anything else.
(I was actually on 1.0.1 but updated and got the same. I have included the debug output and full error.)
Fixed in 1.0.3
Hey, is there a way to view header information? Particularly looking at how you might track replies via the message id.