Specifications
The messageid is the sequence number used in the headers we retrieved earlier. Note that
IMAP messages are numbered from 1, not 0.
If the user clicks one of these links, he will see output like that shown in Figure 27.6.
Building Practical PHP and MySQL Projects
P
ART V
644
FIGURE 27.6
Using the view-message action shows us a particular message—in this case, it’s a piece of spam.
When we enter these parameters into the index.php script, we execute the following code:
case ‘show-headers’ :
case ‘hide-headers’ :
case ‘view-message’ :
{
// if we have just picked a message from the list, or were looking at
// a message and chose to hide or view headers, load a message
$fullheaders = ($action==’show-headers’);
display_message($auth_user, $selected_account, $messageid,
$fullheaders)
break;
}
You ’ll notice that we’re checking the value of the $action being equal to ‘show-headers’. In
this case, it will be false, and $fullheaders will be set equal to false. We’ll look at the
‘show-headers’ action in a moment.
33 7842 CH27 3/6/01 3:41 PM Page 644