Class GetMail (unit Gnetmail) |
Inherits from
TStarSocket
constructor Create(AOwner: TComponent);
- ============================ GetMail =============================
procedure DoGetMail;
function IsHeader(name: string; var value: string): Boolean;
procedure QuitAsap;
soft break
destructor Destroy;
procedure LookupNameDone;
procedure AskForNextMessage;
function CheckError: Boolean;
function CheckRFC1522(s: string): string;
procedure CloseProc;
procedure DidConnect(Sender: TObject);
procedure DoDisconnect(Sender:TObject);
procedure DoMailError(error: GetMailError; add: string);
procedure DoMailInfo(info: GetMailInfo; add: string);
procedure DoRead(Sender:TObject);
function ExtractHeader(line: string;header: string;var stringvar: string):Boolean;
function ExtractString(line:string;name:string): string;
function GetWinsockStarted: Boolean;
procedure IsAvailable(var Message: TMessage);
procedure MailAction(act: TGetMailAction);
procedure NewMimeSection;
function NextMessage: Boolean;
procedure POP3GetMail(line: string);
procedure POP3Login(line:string);
procedure POP3MessageDone;
next line is to catch split headers fixed v1.
procedure ProcessMimeHeaders(line: string);
this only runs if the UIDL command fails
function QuotedDecode(var line: string): Boolean;
procedure RawWrite(data: string);
function RecvText : string;
procedure SetMailStrings(s:TStrings);
procedure SetPort(p: u_short);
procedure SetUIDLList(s: TStrings);
procedure SetWinsockStarted(b: Boolean);
procedure Store_base64(line: string);
procedure Store_Plain(line: string);
start multipart, look for boundary
procedure TimedOut(Sender: TObject);
procedure Write(line: string);
property Mail_Action : TGetMailAction
property Mail_Port : u_short
property Mail_Server : string
property Opt_Delete : Boolean
property Opt_Preview : Boolean
property Opt_Skip : Boolean
property TimeoutArp :
property TimeoutConnect :
property User_ID : string
property User_Password : string
property Version : string
property WinsockStarted : Boolean
property Error : GetMailError
property Mail_Text : TStrings
property Message_Count : integer
property Msg_Date : string
property Msg_From : string
property Msg_ID : string
property Msg_Number : integer
property Msg_Size : longint
property Msg_Subject : string
property Msg_To : string
property Msg_UIDL : string
property Success : Boolean
property UIDLList : TStrings
event OnAttachmentGetLocation : TAttachmentEvent
event OnAttachmentStored : TAttachmentEvent
event OnDone : TNotifyEvent
event OnHeadersLoaded : TGetHeadersEvent
event OnMailError : TGetMailErrorEvent
event OnMailInfo : TGetMailInfoEvent
event OnMessageData : TGMDataEvent
event OnMessageLoaded : TGetMessageEvent
Aborted : Boolean;
AttEncoding : MIME_Encoding;
attfile : integer;
AttNameEvt : TAttachmentEvent;
AttRec : TMimeAttachment;
AttSize : Longint;
AttSkip : Boolean;
AttStoredEvt : TAttachmentEvent;
BndLine : Boolean;
boundaries : integer;
Busy : Boolean;
content : string;
CurMsg : integer;
DiffUIDL : TStrings;
DiffUIDL2 : TStrings;
DLStarted : Boolean;
DummyS : string;
EarlyQuit : Boolean;
FAction : TGetMailAction;
FDate : string;
FDone : TNotifyEvent;
FError : GetMailError;
FFrom : string;
FID : string;
Flush : Boolean;
FMNum : integer;
FMsgCnt : integer;
FMsg_ID : string;
FODel : Boolean;
FOpvw : Boolean;
FOSkip : Boolean;
FPassword : string;
FSize : Longint;
FSubject : string;
FSuccess : Boolean;
FTo : string;
FUIDL : string;
FUIDLList : TStrings;
FVersion : string;
GetHeadersEvt : TGetHeadersEvent;
GetMessageEvt : TGetMessageEvent;
lineout : string;
MailErrorEvt : TGetMailErrorEvent;
MailInfoEvt : TGetMailInfoEvent;
MailStrings : TStrings;
MainEncoding : MIME_Encoding;
MimeBoundary : array[1..32] of string;
mtype : string;
MultiPart : Boolean;
NestingLevel : integer;
NewUIDL : TStrings;
NewUIDL2 : TStrings;
OMD : TGMDataEvent;
OnHold : Boolean;
PartialLine : string;
ProcHeaders : Boolean;
ProtocolInput : TNewLineProc;
spline : string;
step : integer;
tmpline : string;
UIDLSupported : Boolean;
constructor Create(AOwner: TComponent);
============================ GetMail =============================
procedure DoGetMail;
function IsHeader(name: string; var value: string): Boolean;
procedure QuitAsap;
soft break
destructor Destroy;
procedure LookupNameDone;
procedure AskForNextMessage;
function CheckError: Boolean;
function CheckRFC1522(s: string): string;
procedure CloseProc;
procedure DidConnect(Sender: TObject);
procedure DoDisconnect(Sender:TObject);
procedure DoMailError(error: GetMailError; add: string);
procedure DoMailInfo(info: GetMailInfo; add: string);
procedure DoRead(Sender:TObject);
function ExtractHeader(line: string;header: string;var stringvar: string):Boolean;
function ExtractString(line:string;name:string): string;
function GetWinsockStarted: Boolean;
procedure IsAvailable(var Message: TMessage);
procedure MailAction(act: TGetMailAction);
procedure NewMimeSection;
function NextMessage: Boolean;
procedure POP3GetMail(line: string);
procedure POP3Login(line:string);
procedure POP3MessageDone;
next line is to catch split headers fixed v1.3} {fixed again 1.3.9 :-(
procedure ProcessMimeHeaders(line: string);
this only runs if the UIDL command fails
function QuotedDecode(var line: string): Boolean;
procedure RawWrite(data: string);
function RecvText : string;
procedure SetMailStrings(s:TStrings);
procedure SetPort(p: u_short);
procedure SetUIDLList(s: TStrings);
procedure SetWinsockStarted(b: Boolean);
procedure Store_base64(line: string);
procedure Store_Plain(line: string);
start multipart, look for boundary
procedure TimedOut(Sender: TObject);
procedure Write(line: string);
property Mail_Action : TGetMailAction
property Mail_Port : u_short
property Mail_Server : string
property Opt_Delete : Boolean
property Opt_Preview : Boolean
property Opt_Skip : Boolean
property TimeoutArp :
property TimeoutConnect :
property User_ID : string
property User_Password : string
property Version : string
property WinsockStarted : Boolean
property Error : GetMailError
property Mail_Text : TStrings
property Message_Count : integer
property Msg_Date : string
property Msg_From : string
property Msg_ID : string
property Msg_Number : integer
property Msg_Size : longint
property Msg_Subject : string
property Msg_To : string
property Msg_UIDL : string
property Success : Boolean
property UIDLList : TStrings
event OnAttachmentGetLocation : TAttachmentEvent
event OnAttachmentStored : TAttachmentEvent
event OnDone : TNotifyEvent
event OnHeadersLoaded : TGetHeadersEvent
event OnMailError : TGetMailErrorEvent
event OnMailInfo : TGetMailInfoEvent
event OnMessageData : TGMDataEvent
event OnMessageLoaded : TGetMessageEvent
Aborted : Boolean;
AttEncoding : MIME_Encoding;
attfile : integer;
AttNameEvt : TAttachmentEvent;
AttRec : TMimeAttachment;
AttSize : Longint;
AttSkip : Boolean;
AttStoredEvt : TAttachmentEvent;
BndLine : Boolean;
boundaries : integer;
Busy : Boolean;
content : string;
CurMsg : integer;
DiffUIDL : TStrings;
DiffUIDL2 : TStrings;
DLStarted : Boolean;
DummyS : string;
EarlyQuit : Boolean;
FAction : TGetMailAction;
FDate : string;
FDone : TNotifyEvent;
FError : GetMailError;
FFrom : string;
FID : string;
Flush : Boolean;
FMNum : integer;
FMsgCnt : integer;
FMsg_ID : string;
FODel : Boolean;
FOpvw : Boolean;
FOSkip : Boolean;
FPassword : string;
FSize : Longint;
FSubject : string;
FSuccess : Boolean;
FTo : string;
FUIDL : string;
FUIDLList : TStrings;
FVersion : string;
GetHeadersEvt : TGetHeadersEvent;
GetMessageEvt : TGetMessageEvent;
lineout : string;
MailErrorEvt : TGetMailErrorEvent;
MailInfoEvt : TGetMailInfoEvent;
MailStrings : TStrings;
MainEncoding : MIME_Encoding;
MimeBoundary : array[1..32] of string;
mtype : string;
MultiPart : Boolean;
NestingLevel : integer;
NewUIDL : TStrings;
NewUIDL2 : TStrings;
OMD : TGMDataEvent;
OnHold : Boolean;
PartialLine : string;
ProcHeaders : Boolean;
ProtocolInput : TNewLineProc;
spline : string;
step : integer;
tmpline : string;
UIDLSupported : Boolean;