need to care about things such as passing state in urls or hidden fields (it saves state in python in-process variables and memory)and there' no notion of escaping html and url strings (there are no browsersand no network transmission steps once mail is downloadedit also doesn' have to rely on temporary server file links to give access to message parts--the message is retained in memory attached to window object and lives on between interactions on the other handpymailgui does require python to be installed on the clientbut we'll return to that in few pages processing fetched mail at this point in our pymailcgi web interactionwe are viewing an email message (figure - that was chosen from the selection list page on the message view pageselecting an action from the pull-down list and clicking the next button invokes the script in example - on the server to perform replyforwardor delete operation for the selected message viewed example - pp \internet\web\pymailcgi\cgi-bin\onviewpageaction py #!/usr/bin/python ""###############################################################################on submit in mail view windowaction selected=(fwdreplydelete)in +we reuse the mailtools delete logic originally coded for pymailgui###############################################################################""import cgicommonhtmlsecret from externs import mailtoolsmailconfig from commonhtml import getfield def quotetext(form)""note that headers come from the prior page' form herenot from parsing the mail message againthat means that commonhtml viewpage must pass along date as hidden field ""parser mailtools mailparser(addrhdrs ('from''to''cc''bcc'decode name only quoted '\noriginal message\nfor hdr in ('from''to''date')rawhdr getfield(formhdrif hdr not in addrhdrsdechdr parser decodeheader(rawhdr decode for display elseencoded on sends dechdr parser decodeaddrheader(rawhdremail names only quoted +'% % \ (hdrdechdrquoted +'\ngetfield(form'text'quoted '\nquoted replace('\ ''\ 'return quoted the pymailcgi server