When you say "the body contents are empty" what do you mean? At the very least you should have a TEXT/PLAIN body passed back.
Also, why are you calling rfc822_parse_msg()? This is a very low-level routine in c-client. For most purposes, you would use the higher level mail_fetch_structure() instead. If you use the low-level routines, you may be causing yourself a lot more work than is necessary.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.