Let’s start off by implementing a main page for this example. The file shown in Example 13-2 is primarily used to publish links to the Send and View functions’ pages. It is coded as a static HTML file, because there is nothing to generate on the fly here.
Example 13-2. PP2E\Internet\Cgi-Web\PyMailCgi\pymailcgi.html
<HTML><BODY> <TITLE>PyMailCgi Main Page</TITLE> <H1 align=center>PyMailCgi</H1> <H2 align=center>A POP/SMTP Email Interface</H2> <P align=center><I>Version 1.0, April 2000</I></P> <table><tr><td><hr> <P> <A href="http://rmi.net/~lutz/about-pp.html"> <IMG src="../PyErrata/ppsmall.gif" align=left alt="[Book Cover]" border=1 hspace=10></A> This site implements a simple web-browser interface to POP/SMTP email accounts. Anyone can send email with this interface, but for security reasons, you cannot view email unless you install the scripts with your own email account information, in your own server account directory. PyMailCgi is implemented as a number of Python-coded CGI scripts that run on a server machine (not your local computer), and generate HTML to interact with the client/browser. See the book <I>Programming Python, 2nd Edition</I> for more details.</P> <tr><td><hr> <h2>Actions</h2> <P><UL> <LI><a href="onRootViewLink.cgi">View, Reply, Forward, Delete POP mail</a> <LI><a href="onRootSendLink.cgi">Send a new email message by SMTP</a> </UL></P> <tr><td><hr> <P>Caveats: PyMailCgi 1.0 was initially written during a 2-hour layover at Chicago's O'Hare airport. ...
No credit card required