implemented in the following directory of the book' examples distributionpp \internet\web\dev\pymailcgi_ when developedit worked under the firefox web browser and it requires just more than lines of code changes among three source fileslisted here (search for "#experimentalto find the changes made in the source files yourself)onviewlistlink py hdrstext fulltext split('\ \ ')[ use blank line commonhtml viewpageencodes passwd msgnummessagecontentformhdrstextpartscommonhtml py def viewpage(msgnumheaderstextformhdrstextparts=[])delete needs hdrs text for inbox sync testscan be multi- large hdrstext cgi escape(hdrstextquote=trueescape '"too print('hdrstextonviewpageaction py fetcher mailtools silentmailfetcher(siteuserpswd#fetcher deletemessages([msgnum]hdrstext getfield(form'hdrstext''\nhdrstext hdrstext replace('\ \ ''\ 'get \ from top dummyhdrslist [nonemsgnum only one msg hdr dummyhdrslist[msgnum- hdrstext in hidden field fetcher deletemessagessafely([msgnum]dummyhdrslistexc on sync err commonhtml confirmationpage('delete'to run this version locallyrun the webserver script from example - (in with the dev subdirectory nameand unique port number if you want to run both the original and the experimental versions for instancec:\pp \internet\webwebserver py dev\pymailcgi_ command line web browser url although this version works on browsers testedit is considered tentative (and was not used for this and not updated for python in this editionbecause it is an incomplete solution in those rare cases where the server' inbox changes in ways that invalidate message numbers after server fetchesthis version avoids inaccurate deletionsbut index lists may still become out of sync messages fetches may still be inaccurateand addressing this likely entails more sophisticated state retention options note that in most casesthe message-id header would be sufficient for matching against mails to be deleted in the inboxand it might be all that is required to pass from page to page howeverbecause this field is optional and can be forged to have any valuethis might not always be reliable way to identify matched messagesfull header the pymailcgi server