The Root Page

Let’s start off by implementing a main page for this example. The file shown in Example 17-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 17-2. PP3E\Internet\Web\PyMailCgi\pymailcgi.html

<HTML> <TITLE>PyMailCGI Main Page</TITLE> <BODY> <H1 align=center>PyMailCGI</H1> <H2 align=center>A POP/SMTP Web Email Interface</H2> <P align=center><I>Version 2.0, January 2006</I></P> <table> <tr><td><hr> <h2>Actions</h2> <P> <UL> <LI><a href="cgi-bin/onRootViewLink.py">View, Reply, Forward, Delete POP mail</a> <LI><a href="cgi-bin/onRootSendLink.py">Send a new email message by SMTP</a> </UL></P> <tr><td><hr> <h2>Overview</h2> <P> <A href="http://rmi.net/~lutz/about-pp.html"> <IMG src="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, 3rd Edition</I> for more details.</P> <tr><td><hr> <h2>Notes</h2> <P>Caveats: PyMailCgi 1.0 was initially written during a ...

Get Programming Python, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.