Before building a web application, it's always good to define the requirements and build to them. You may never have considered the requirements for an e-mail application before. You probably use an e-mail application like Outlook, Thunderbird, or Eudora on a daily basis and have never really stopped to think about all the things it must do to provide a good user experience. For simplicity, AjaxMail will support a subset of what these applications do (although it is easy enough to extend the functionality on your own).
The requirements for AjaxMail are:
Support for POP3 to receive mail and SMTP to send mail
Ability to read a list of e-mail messages from the server
Visual indication if a message contains an attachment
Ability to read an individual e-mail with support for plain text messages only
Notification when new mail messages arrive
Ability to send, forward, and reply to messages
To implement these requirements, a variety of Ajax patterns and communication techniques will be used. There is extensive use of XMLHttp, requiring the use of the zXml library, as well as some hidden iframes. In building this application, you will learn how to incorporate and integrate the various techniques you have learned in this book.