Ask a Question related to PHP Development, Design and Development.
-
Martoni #1
getting only unread mail
I'm trying to read only new mail from a mailbox and display it in a table.
What I'm doing is this (server data obfuscated):
$mail=imap_open('{SERVER}', 'ACC', 'PW');
if($mail){
$headers=imap_headers($mail);
// Get number of mail
$current=imap_num_msg($mail);
// Get content of mails retrieved, formated and presented
$header=imap_header($mail,$current);
for($i = 1; $i <= $current; $i++){
$header=imap_header($mail,$i);
$recent=$header->Recent;
$unseen=$header->Unseen;
if($recent == "N" || $unseen == "U"){
process mail in various ways
[snipped]
As I understand it (php.net on imap_headers) the if($recent == etc) method
is the way to get only new mail and ignore the rest. But I still get all
mail every time I open the mailbox.
Am I doing something wrong or is our slightly non-standard mail server
misbehaving?
Rgds,
Martin S
Martoni Guest
-
finding first unread record
I am looking for a simple way to query a table and pull up the first record with an empty value in the date_processed column. I have tried a... -
read / unread system for my forum
Hi all i'm coding a little forum an now i want to make a read / unread system for the new posts and topics. Can anybody explain to me, how I can... -
Says 99 unread mail messages
my system on the windows log in screen under my user name keeps telling me that I have 99 unread email messages. I have no unread messages. I am... -
Unread messages
Hi, I'm running Windows XP, and on the Select User screen a number of unread e-mail messages are listed under my account name - however, these are... -
Log in screen & unread emails
If I have unread emails in Outlook Express this shows up on the log in screen. How do I show unread emails if I use MS Outlook?



Reply With Quote

