the raw messages returned from the fetch(method still aren' very useful to people who just want to read their email the pyzmail module parses these raw messages and returns them as pyzmessage objectswhich make the subjectbody"tofield"fromfieldand other sections of the email easily accessible to your python code continue the interactive shell example with the following (using uids from your own email accountnot the ones shown here)import pyzmail message pyzmail pyzmessage factory(rawmessages[ ][ 'body[]']firstimport pyzmail thento create pyzmessage object of an emailcall the pyzmail pyzmessage factory(function and pass it the 'body[]section of the raw message (note that the prefix means this is bytes valuenot string value the difference isn' too importantjust remember to include the prefix in your code store the result in message now message contains pyzmessage objectwhich has several methods that make it easy to get the email' subject lineas well as all sender and recipient addresses the get_subject(method returns the subject as simple string value the get_addresses(method returns list of addresses for the field you pass it for examplethe method calls might look like thismessage get_subject('hello!message get_addresses('from'[('edward snowden''esnowden@nsa gov')message get_addresses('to'[('jane doe''my_email_address@example com')message get_addresses('cc'[message get_addresses('bcc'[notice that the argument for get_addresses(is 'from''to''cc'or 'bccthe return value of get_addresses(is list of tuples each tuple contains two stringsthe first is the name associated with the email addressand the second is the email address itself if there are no addresses in the requested fieldget_addresses(returns blank list herethe 'cccarbon copy and 'bccblind carbon copy fields both contained no addresses and so returned empty lists getting the body from raw message emails can be sent as plaintexthtmlor both plaintext emails contain only textwhile html emails can have colorsfontsimagesand other features that make the email message look like small web page if an email is only plaintextits pyzmessage object will have its html_part attributes set to none likewiseif an email is only htmlits pyzmessage object will have its text_part attribute set to none sending email and text messages