Hi there...
Ive got a small problem....
- Ive done a small script - which ive been running a short time -
Which accesses my POP account, & it seems to be going...
HOWEVER - from the logs - Theres always 1 message in the system, that
is left un-touched....
CODE :-
This small routine lists the messages in the pop account....
==================
$headers=imap_headers($link);
$t=0;
while (list ($key, $val) = each ($headers)) {
echo "Z '$key' -- '$val'<BR>\n\n";
$t=$key;
}
==================
RESULT :- (example)
==================
Z '0' -- ' U 1)30-Mar-2005 Name Message Subject Here
(3577 chars)'<BR>
==================
So - There is one message in the system - with an identitry of '0'.
CODE :-
- This code actually loops through each message - Extracts it - &
processes it :-
==================
for($x=0; $x <= $t; $x++) {
$TRANSFER=0;
$REGISTER=0;
$VOTE=0;
echo "\n*****\nREADING NEW MESSAGE $x of $t\n\n";
$GOT=0;
echo "\nBODY4- - $x<BR>\n\n";
#echo(imap_fetchheader($link,$x));
$test =imap_fetchheader($link,$x);
$body1 = imap_body($link,$x);
etc.....
==================
The 2nd part of the script - Always leaves 1 message in the queue.....
(sometimes the message left - changes - which is good...)
Im going to try & cxhange the code so when the 2nd routine starts, $t++;
(hopefully that will fix...)
But why wouldnt the script work otherwise ?
--
G Stewart
Gmail invites - Hundreds available..
Gmail : [EMAIL PROTECTED]
NZ: [EMAIL PROTECTED]
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/