
hello,
im using fMailbox to read messages from my gmail email and process them into data base using a cronjob evry 10mins.
My problem comes when I fetchMessage(), process it, try do deleteMessages() and nothing happens(message is still there), cuz in the next call of my cronjob it process again the same messages it made before.
heres my code:
$mailbox = new fMailbox('pop3', 'pop.gmail.com', 'my.email@gmail.com', 'mypw', 995, TRUE);
$messages = $mailbox->listMessages();
if(empty($messages)) exit;
foreach($messages as $k => $v){
$message = $mailbox->fetchMessage($v['uid']);
addNewMessage($v, $message);
$mailbox->deleteMessages($v['uid']);
}
im doing something wrong?
thx for your time and replies