prints the complete and raw full text of one message at timepausing between each until you press the enter key the input built-in is called to wait for the key press between message displays the pause keeps messages from scrolling off the screen too fastto make them visually distinctemails are also separated by lines of dashes we could make the display fancier ( we can use the email package to parse headersbodiesand attachments--watch for examples in this and later )but here we simply display the whole message that was sent this works well for simple mails like these twobut it can be inconvenient for larger messages with attachmentswe'll improve on this in later clients this book won' cover the full of set of headers that may appear in emailsbut we'll make use of some along the way for examplethe -mailer header lineif presenttypically identifies the sending programwe'll use it later to identify python-coded email senders we write the more common headers such as from and subject are more crucial to message in facta variety of extra header lines can be sent in message' text the received headersfor exampletrace the machines that message passed through on its way to the target mailbox because popmail prints the entire raw text of messageyou see all headers herebut you usually see only few by default in end-user-oriented mail guis such as outlook and webmail pages the raw text here also makes apparent the email structure we noted earlieran email in general consists of set of headers like those herefollowed by blank linewhich is followed by the mail' main textthough as we'll see laterthey can be more complex if there are alternative parts or attachments the script in example - never deletes mail from the server mail is simply retrieved and printed and will be shown again the next time you run the script (barring deletion in another toolof courseto really remove mail permanentlywe need to call other methods ( server dele(msgnum))but such capability is best deferred until we develop more interactive mail tools notice how the reader script decodes each mail content line with line decode into str string for displayas mentioned earlierpoplib returns content as bytes strings in in factif we change the script to not decodethis becomes more obvious in its output[press enter keyassorted lines omitted 'datewed may : : - (edt) 'fromlutz@rmi netb'reply-tolutz@rmi netb'topp @learning-python comb"subjecti' lumberjackand ' okayb'mime-version 'content-typetext/plaincharset=utf- 'content-transfer-encoding bitb' -mailerearthlink zoo mail client-side scripting