imap_fetch_overview [SOLVED]
Posted: Thu Jan 05, 2006 9:11 pm
Jcart | Please use
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hey gang..
Ok... Moving forward
I have a POP3 account that I'm trying to write some scripts for.. There's one message only in the account... I'm able to connect to the account just fine..
Using the code snippet below (Mostly from php.net)... I cannot get $val,$subj, or $val->subject to echo a value.. I'm assuming that it means nothing is being assigned.
$message works perfectly, so I'm taking that to mean that the message number is correct, since all the values are using $i to work through the mailbox.. Any thoghts would be welcome as always.
Thanks
davidCode: Select all
$MC=imap_check($mbox);
$MN=$MC->Nmsgs;
$overview=imap_fetch_overview($mbox,"1:$MN",0);
$size=sizeof($overview);
for($i=1;$i<($size+1);$i++){
$val=$overview[$i];
$subj=$val->subject;
$message = imap_body($mbox,$i);
echo "$val->subject $message";
}Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]