Specifications

For a user to read his mail, we will need to get his server and account details. Rather than get-
ting these details from the user every time, well set up a username and password database for
a user so that we can store his details.
Often people have more than one email account (one for home and another for work, for exam-
ple), and we should allow them to connect to any of their accounts. We should therefore allow
them to have multiple sets of account information in the database.
We should enable users to read, reply to, forward, and delete existing emails, as well as send
new ones. We can do all the reading parts using IMAP or POP3, and all the sending parts using
SMTP with mail().
Lets look at how well put it all together.
Solution Overview
The general flow through this Web-based system wont be much different from other email
clients. A diagram showing the system flow and modules is shown in Figure 27.1.
Building Practical PHP and MySQL Projects
P
ART V
620
Login
View
mailbox
Select
Account
Set up
account
Logout
New
mail
View
message
Forward
Reply
all
Reply
Show/hide
headers
Delete
FIGURE 27.1
The interface for Warm Mail gives the user mailbox-level functionality and message-level functionality.
As you can see, we will first require a user to log in, and then give him a choice of options. He
will be able to set up a new mail account or select one of his existing accounts for use. He will
also be able to view his incoming mailresponding to, forwarding, or deleting itand send
new mail.
33 7842 CH27 3/6/01 3:41 PM Page 620