Introduction
Some years ago I designed and implemented a simple mail client based on a JSP and Struts. It is a good example of a small web application which leverages the capabilities of this Java MVC framework. In the following pages I’ll describe the design process I followed.
This project was inspired my perception of the need for a simple, no frills mail client suitable for people who want to use email, but are frustrated by all the bells and whistles that clutter so many mail programs. This is particularly true for elderly people who have little prior exposure to computers. They want to send and receive mail, and have little need for the sort of features appropriate to professional users. None of the mail programs I was familiar with exhibited the sort of simplicity that I was after.
Requirements
From the user’s perspective, the basic features are:
- A standard folder set (In, Sent, Draft and Trash), with no folder manipulation, i.e. no creation of new folders. Moving of messages is restricted to deletion of messages, or resumption of a draft. Message deletion follows the standard pattern: messages deleted from the In, Sent, or Draft folders are moved to the Trash folder. Message deleted from the Trash folder are gone for good.
- The normal Reply, Reply All, and Forward functions
- A simple address book, with just name, email address and one optional, general information field. Entries are sorted by name.
- Support for attachments, with inline display of received image files
- Sorting of folder contents by Sender, Date, or Subject
- A single “To” address field, but no “CC” or “BCC” field
At the technical level, I opted for the following capabilities:
- Localization of all text strings using the Java resource bundle capability
- Statically defined mail server configuration, i.e. a given web application installation maps to a single IMAP server and a single SMTP server.
- Use of a SQL database for credential and address book storage.
- The standard BASIC authentication mechanism, with username and password the same as those of the IMAP mail account.
- Remote folder refresh from the IMAP server, i.e. of no persistent storage on the web server of all folder contents
Note that the use of container-managed authentication precludes the ability to log out of the application without closing the browser. I plan to replace this in the future with a custom form based mechanism supporting a logout function.