Re: have a question about pop3client!

Giganews Newsgroups
Subject: Re: have a question about pop3client!
Posted by:  Remy Lebeau (TeamB) (gambit…@yahoo.com)
Date: Sat, 13 Sep 2003

"titaniumserver" <adm…@titaniumserver.de> wrote in message
news:303E90ADAD7EE240adm…@titaniumserver.de...
> Hello, I would call just new messages from server but I don't
> know how! I trid it with i:=sencmd('LAST') and
> Newmessages:= Messages-i, but it don't work!

The POP3 protocol does not have a LAST command.

Try using TIdPOP3's CheckMessages() method instead, which wraps the STAT
command:

    int Messages = IdPOP3.CheckMessages;
    //...
    int NewMessages := IdPop3.CheckMessages - Messages;
    Messages := Messages + NewMessages;
    //...

Gambit

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03

Replies

None

In response to

have a question about pop3client! posted by titaniumserver on Sat, 13 Sep 2003