It seems that some of the IMAP properties are undefined try this script to
see what I mean.  Also there is a problem when calling IMAP properties when
within a function.

LAter
DAn


<?php

$msg_no = 1;

$mbox = imap_open ("{your.server.name/POP3:110}", "USER NAME", "PASSWORD");

echo "<p><h1>Mailboxes</h1>\n";
$folders = imap_listmailbox ($mbox, "{your.server.name/POP3:110}", "*");

if ($folders == false) {
    echo "Call failed<br>\n";
} else {
    while (list ($key, $val) = each ($folders)) {
        echo $val."<br>\n";
    }
}

echo "<p><h1>Headers in INBOX</h1>\n";
$headers = imap_headers ($mbox);

if ($headers == false) {
    echo "Call failed<br>\n";
} else {
    while (list ($key,$val) = each ($headers)) {
        echo $val."<br>\n";
    }
}

echo "<p><h1>Structures</h1>\n";
$the_structure=imap_fetchstructure ($mbox,$msg_no);
echo "type - Primary body type - " . $the_structure->type;
echo"<br>\n";

echo "encoding - Body transfer encoding - " . $the_structure->encoding;
echo"<br>\n";

 if($the_structure->ifsubtype)
 {
 echo "subtype - MIME subtype - " . $the_structure->subtype;
 echo"<br>\n";
 }
 else
 {
  echo"NO subtype";
   echo"<br>\n";
 }

if($the_structure->ifdescription)
 {
 echo "subtype - Content description string - " .
$the_structure->description;
 echo"<br>\n";
 }
 else
 {
  echo"NO description";
   echo"<br>\n";
 }

  if($the_structure->ifid)
 {
 echo "id - Identification string - " . $the_structure->id;
 echo"<br>\n";
 }
 else
 {
  echo"NO id";
   echo"<br>\n";
 }

echo "lines  - Number of lines - " . $the_structure->lines;
echo"<br>\n";

echo "bytes  - Number of bytes  - " . $the_structure->bytes;
echo"<br>\n";

 if($the_structure->ifdisposition)
 {
 echo "Disposition  - " . $the_structure->disposition;
 echo"<br>\n";
 }
 else
 {
  echo"NO Disposition";
   echo"<br>\n";
 }
 // ifdparameters True if the dparameters array exists
// dparameters Disposition parameter array
 if($the_structure->ifdparameters)
 {
 echo "dparameters Disposition parameter array  - " .
$the_structure->dparameters;
 echo"<br>\n";
 }
 else
 {
  echo"NO dparameters";
   echo"<br>\n";
 }

// ifparameters True if the parameters array exists
// parameters MIME parameters array
 if($the_structure->ifparameters)
 {
 echo "parameters MIME parameters array  - " . $the_structure->parameters;
 echo"<br>\n";
 }
 else
 {
  echo"NO dparameters";
   echo"<br>\n";
 }


echo "parts - Array of objects describing each message part   - " .
$the_structure->parts;
echo"<br>\n";

   echo"<br>\n";
/*
dparameters is an array of objects where each object has an "attribute" and
a "value" property.

Parameter is an array of objects where each object has an "attributte" and a
"value" property.

Parts is an array of objects identical in structure to the top-level object,
with the limitation that it cannot contain further 'parts' objects
*/



echo "<p><h1>IMAP STATUS</h1>\n";
$status = imap_status($mbox,"{your.server.name/POP3:110}INBOX",SA_ALL);
if($status) {
  print("Messages:   ". $status->messages   )."<br>\n";
  print("Recent:     ". $status->recent     )."<br>\n";
  print("Unseen:     ". $status->unseen     )."<br>\n";
  print("UIDnext:    ". $status->uidnext    )."<br>\n";
  print("UIDvalidity:". $status->uidvalidity)."<br>\n";
} else
  print "imap_status failed: ".imap_lasterror()."\n";


imap_close($mbox);

?>

"Jan Walter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi all,
>
> does anyone have any idea, why the imap_headers($mbox) function from
> php_imap.dll from php4win.de's last 4.0.4fixed release does not work?
>
> Browser seems to work, but anytime time-out comes.
>
> However imap_open() seems to work OK.
>
> Thanx for any hint
> --
>
____________________________________________________________________________
______________
>
>
============================================================================
==============
>
> Jan Walter, called John
> LERACH, s.r.o.
> phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
> on emergency call cell phone: +420-602-385 760
> work e-mail mailto:[EMAIL PROTECTED]
> private e-mail mailto:[EMAIL PROTECTED]
> ICQ#: 28353428
>
____________________________________________________________________________
______________
>
>
============================================================================
==============
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to