I'm having some basic problems with the following pages, index.php (frames
base), email.php, and body.php.

 

I can retrieve email from the email account, but when I click on a link in
the email.php to open the email in body.php, $msgid is not defined in
body.php.  It's got to be something basic, but right now, it escapes me.
Right now this is running on my Windows 2000 Pro machine.

 

Any help would be appreciated.  Thank you in advance.

 

Chuck

 

----------------------------------------------------------------------------

 

Index.php

 

<!-- frames -->

<frameset rows="5%,30%,*" frameborder="NO" border="0" framespacing="0">

    <frame name="nav" src="nav.php" marginwidth="0" marginheight="0"
scrolling="auto" frameborder="0">

    <frame name="inbox" src="email.php" marginwidth="0" marginheight="0"
scrolling="auto" frameborder="0">

    <frame name="mail" id="mail" src"" frameborder="0" scrolling="Auto"
marginwidth="0" marginheight="0">

</frameset>

 

----------------------------------------------------------------------------

 

----------------------------------------------------------------------------

 

Email.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<html>

<head>

            <title>Email Test</title>

  <style type="text/css">

    Body, TR, TD, Table {

      color : Black;

      font : 11px Arial, Helvetica, sans-serif;

    }

  </style>

</head>

 

<body>

<table border="0" width="100%" cellspacing="0" cellpadding="5">

            <tr bgcolor="#FF9900">

                        <th>From</th>

                        <th>Subject</th>

                        <th>Date</th>

            </tr>

<?php

  set_time_limit(360);

            $mbox = imap_open ("{172.16.1.23:143}INBOX", "user",
"password");

            

  $mcheck = imap_check($mbox);

  $mnum = $mcheck->Nmsgs;

  $overview = imap_fetch_overview($mbox, "1:$mnum", 0);

 

            $headers = imap_headers ($mbox);

 

  // Data Table

            $nbm = sizeof($overview);

  for($x= $nbm-1; $x >= 0; $x--) {

    $val=$overview[$x];

                        $nb = $val->msgno;

    $sFrom =$val->from;

    $sSubject = $val->subject;

    if($sSubject == '') {

                                    $sSubject = "<em>No Subject
Included</em>";

                        }

    $dDate=$val->date;

    // Inbox Output

    print "

                        <tr>

                                    <td>$sFrom</td>

                                    <td><A HREF=\"body.php?msgid=$nb\"
target=\"mail\">$sSubject</A></td>

                                    <td>$dDate</td>

                        </tr>";

            }

 

            imap_close($mbox);

?>

 

</table>

 

</body>

</html>

 

----------------------------------------------------------------------------

 

 

----------------------------------------------------------------------------

 

Body.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<TITLE> New Document </TITLE>

</HEAD>

 

<BODY>

 

<?php

            $mbox = imap_open ("{172.16.1.23:143}INBOX",
"USHQ\ysgcbr\cbrockman", "l3tm31n");

            

            $mailheader=imap_header($mbox,$msgid);

            $rawsubject = imap_mime_header_decode($mailheader->subject);

            $msubject=$rawsubject[0]->text;

            
$mfrom=htmlspecialchars(str_replace("\"","",$mailheader->fromaddress));

            
$mto=htmlspecialchars(str_replace("\"","",$mailheader->toaddress));

            
$mcc=htmlspecialchars(str_replace("\"","",$mailheader->ccaddress));

            $mreply=$mailheader->reply_toaddress;

            $mdate=$mailheader->Date;

 

            $mailcheck = imap_check($mbox);

            $mailnumber = $mailcheck->Nmsgs;

 

            // Get the structure of the email

            $structure = imap_fetchstructure($mbox,$msgid);

            

            /*

  if (isset($msgid)) {

    //$msgid = "$msgid";

  } 

  

  if (empty($msgid)) {

    //$mnum = $mcheck->Nmsgs;

    //$msgid = "$mnum";

  }

 */ 

 

            imap_close($mbox);

?>

 

 

</BODY>

</HTML>

 

----------------------------------------------------------------------------

 

 


------ End of Forwarded Message

------ End of Forwarded Message

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to