Then something in your code is bad, as ->parse_headers is documented to return a hashref in Mail::IMAPClient.
Are you sure you are using a valid message id?
Maybe you can show us a short but complete example of how you are using ->parse_headers and how you obtain the message id.
In reply to Re^5: read gmail and extract cc field
by Corion
in thread read gmail and extract cc field
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |