userpswdsite commonhtml getstandardpopfields(formpswd secret decode(pswdtryif form['action'value ='reply'headers {'from'mailconfig myaddress commonhtml decodes 'to'getfield(form'from')'cc'mailconfig myaddress'subject''regetfield(form'subject')commonhtml editpage('reply'headersquotetext(form)elif form['action'value ='forward'headers {'from'mailconfig myaddress commonhtml decodes 'to''''cc'mailconfig myaddress'subject''fwdgetfield(form'subject')commonhtml editpage('forward'headersquotetext(form)elif form['action'value ='delete'mnum field is required here msgnum int(form['mnum'valuebut not eval()may be code fetcher mailtools silentmailfetcher(siteuserpswdfetcher deletemessages([msgnum]commonhtml confirmationpage('delete'elseassert false'invalid view action requestedexceptcommonhtml errorpage('cannot process view action'this script receives all information about the selected message as form input field data (some hidden and possibly encryptedsome notalong with the selected action' name the next step in the interaction depends upon the action selectedreply and forward actions generate message edit page with the original message' lines automatically quoted with leading delete actions trigger immediate deletion of the email being viewedusing tool imported from the mailtools module package from all these actions use data passed in from the prior page' formbut only the delete action cares about the pop username and password and must decode the password received (it arrives here from hidden form input fields generated in the prior page' htmlreply and forward if you select reply as the next actionthe message edit page in figure - is generated by the script text on this page is editableand pressing this page' send button again triggers the send mail script we saw in example - if all goes wellwe'll receive the processing fetched mail