Hack 76. Take a Walk on the Lighter Side

JavaScript-disabled, not yet supported, text-only, or on a PDA or
mobile phone .Being a child of Google, Gmail hides all of its complexity behind a
rich, deep, feature-packed yet user-friendly web mail interface,
assuming you have the right browserone of recent
vintagefor the job. But what to do if your IT department
hasn't upgraded your version of the Internet
Explorer browser since Windows 95, you're quite
happy with the text-only Lynx browser, you're
running the latest nightly build of browser XYZ, which Gmail simply
doesn't like, or you're trying to
reach your mail from a PDA or smartphone? Gmail-lite (home page: http://sourceforge.net/projects/gmail-lite,
SourceForge project page: http://sourceforge.net/projects/gmail-lite;
GNU Public License), as the name suggests, puts a
plain HTML face on Gmail. It is a PHP application that proxies your
interactions with Gmail, allowing you to surf using whatever browser
you have at hand or just plain prefer just plain prefer, while
keeping Gmail happy with its end of the conversation.The authors of gmail-lite have done a fantastic job, affording you a
plain HTML interface to just about every bit of functionality Gmail
provides through its more interactive JavaScript-based frontend.
6.9.1. Installing the Hack
You have to marvel at the wonders of PHP-based applications and their
simple installation. Assuming you have the prerequisites taken care
of, it's just a matter of downloading, unpacking,
and enjoying. I installed gmail-lite both on my local Mac OS X laptop
and under my hosted ISP account in seconds each.
|
and unpack the distribution (0.56 at the time of this writing, but
yours is sure to be a later version) somewhere under your web
server's document root, where the rest of your web
site lives (ask your system administrator or service provider if
you're not sure where this is):
$ tar -xvzf gmail-lite-0.56
.tar.gz
gmail-lite-0.56/
gmail-lite-0.56/compose.php
gmail-lite-0.56/config.php
gmail-lite-0.56/debug.php
gmail-lite-0.56/diagnose.php
gmail-lite-0.56/dl.php
gmail-lite-0.56/docsl
gmail-lite-0.56/index.php
gmail-lite-0.56/INSTALL
gmail-lite-0.56/libgmailer.php
gmail-lite-0.56/logout.php
gmail-lite-0.56/main.php
gmail-lite-0.56/star.gif
$ mv gmail-lite-0.56 gmail-lite
|
diagnose.php using the URL corresponding to the
gmail-lite directory on your web
sitee.g., http://www.example.com/~rael/gmail-lite/diagnose.php
The resulting page should look like Figure 6-18.
Figure 6-18. The diagnose.php script makes sure that everything is installed as expected

something's gone wrong, consult the installation and
troubleshooting documentation in the INSTALL
text file in your gmail-lite folder.
6.9.2. Running the Hack
Point your computer's web browser at the URL
corresponding to the gmail-mobile directory on
your web sitee.g.,
http://www.example.com/~rael/gmail-lite (or just
click the "Press here..." link on
the diagnose.php page).
|
will appear in a typical browser window. Enter your Gmail login
(e.g.,
username@gmail.com) and
password, alter the time zone if you feel so inclined, and click the
"sign-in" button.
Figure 6-19. A gloriously plain HTML Gmail login page in a typical browser window

your Gmail Inbox, Sent, Trash, and Spam folders, Starred messages,
and personal labelsshown in Figure 6-20 as it
appears in a smartphone XHTML web browser.
Figure 6-20. A summary of the state of your Gmail account as it appears in a smartphone XHTML browser

simple list of your incoming messages, as shown
on a Pocket PC in Figure 6-21. At the top is a quick-link toolbar and
pull-down menus for switching views, exploring labeled mail, and
searching your Gmail messages ["Gmail Search
Syntax" earlier in this chapter]. (Click the Get
button after making your selections or entering a search query.) At
the bottom are actions you can apply to any number of checked
messages (check the associated checkbox to the right of a message
subject to act upon it), including archive/unarchive, label,
star/unstar, mark as read/unread, mark/unmark as spam, and
trash/untrash. (Click the Do button to apply any action.)
Figure 6-21. Your Gmail inbox, as seen through a Pocket PC

shows a typical email message viewed in the text-only Lynx
browser. The layout of individual message pages is much like that of
the Inbox (or any folder) view. As you can see in the figure,
I'm about to take a look at all my
"foo"-labeled messages.
Figure 6-22. An individual message in the Lynx text-only browser

you can do through Gmail proper. (In all likelihood, by the time you
read this, Gmail will have built its own plain HTML version without
all the browser and JavaScript requirements. Still, this is a great
hack and worth fiddling about with.)
|
6.9.3. See Also
If you're wanting to Gmail from a mobile phone with
only a very basic WAP browser on board, you can still Gmail on the go
with gmail-mobile Hack #77 .
And be sure to check out Hack #67 ] for taking Google search
along too.