Thema: Delphi mails kontrollieren

Einzelnen Beitrag anzeigen

Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#13

Re: mails kontrollieren

  Alt 19. Sep 2004, 11:59
genau, du musst dir die ID's merken um später sagen zu können welche neu sind und welche nicht. Wenn es dir nur darum geht festzustellen ob neue nachrichten da sind kannst du die Methode
UIDL
benutzen. Diese liefert dir alle ID's zurück aus der Mailbox
Zitat:
Retieves the unique-id listing for one or all messages in the mailbox.

function UIDL(const ADest: TStrings; const AMsgNum: Integer): Boolean;

Parameters

const ADest: TStrings

Container for UID values in the listing.

const AMsgNum: Integer = -1

The message number desired, or all messages when the value is -1. Default value is -1.

Returns

Boolean - True on success.

Description

UIDL is a Boolean function used to retrieve the unique-id listing for one or all messages in the POP3 mailbox. When AMsgNum is specified, UIDL will request the UIDL for the specified message number. Otherwise, all message numbers in the mailbox are requested from the POP3 server.

UIDL calls SendCmd with the POP3 UIDL command and the optional message number. When the response code from SendCmd is wsOk, the response values are stored in Dest. Value from the POP3 UIDL command consist of the message number folowed by a space character and the unique-id for the message. The unique-id of a message is an arbitrary server-determined string, consisting of one to 70 characters in the range 0x21 to 0x7E, and uniquely identifies a message within a POP3 mailbox. Messages marked as deleted are not included in a UIDL listing.
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat