| Class TCustomSmtpClient (unit smtpcli) |
TComponent
Base component, implementing the transport, without MIME support
| Constructors |
constructor Create(AOwner : TComponent);| Functions |
function Abort : Boolean;
function Connect : Boolean;
destructor Destroy;
function Mail : Boolean;
function Quit : Boolean;
function Rset : Boolean;
procedure ClearErrorMessage;
procedure DataSent(Sender : TObject; Error : WORD);
procedure Display(Msg : String);
procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean);
procedure EndUUEncode(var hFile: File);
function GetResponse : Integer;
procedure InitUUEncode(var hFile: File; sFile: string);
procedure Notification(AComponent: TComponent; Operation: TOperation);
procedure SendCommand(Cmd : String);
procedure SendHeaderLine(Line : PChar; Size : Integer);
procedure SessionClosed(Sender : TObject; Error : WORD);
procedure SetErrorMessage;
procedure SetRcptName(newValue : TStrings);
procedure SetWait(Value : TWait);
procedure TriggerGetData(LineNum : Integer;
MsgLine : PChar;
MaxLen : Integer;
var More : Boolean);
procedure TriggerHeaderLine(Line : PChar; Size : Integer);
procedure TriggerProcessHeader(HdrLines : TStrings);
function WaitResponse(ValidResponse : integer; CloseOnError : Boolean) : Boolean;
function WaitResponse2(ValidResponse1 : Integer;
ValidResponse2 : Integer;
CloseOnError : Boolean) : Boolean;
procedure WaitTimeOut(Sender : TObject);| Properties |
property WSocket : TWSocket
property CharSet : String
property ErrorMessage : String
property FromName : String
property HdrFrom : String
property HdrSubject : String
property HdrTo : String
property Host : String
property LastResponse : String
property Port : String
property RcptName : TStrings
property SignOn : String
property Tag : LongInt
property TimeOut : Integer
property Wait : TWait| Events |
event OnDisplay : TSmtpDisplay
event OnGetData : TSmtpGetDataEvent
event OnHeaderLine : TSmtpHeaderLineEvent
event OnProcessHeader : TSmtpProcessHeaderEvent| Variables |
FCharSet : String;
FDataSentFlag : Boolean;
FErrorMessage : String;
FFromName : String;
FHdrFrom : String;
FHdrSubject : String;
FHdrTo : String;
FHost : String;
FLastResponse : String;
FOnDisplay : TSmtpDisplay;
FOnGetData : TSmtpGetDataEvent;
FOnHeaderLine : TSmtpHeaderLineEvent;
FOnProcessHeader : TSmtpProcessHeaderEvent;
FPort : String;
FRcptName : TStrings;
FSignOn : String;
FState : TSmtpState;
FTag : LongInt;
FTimeout : Integer;
FTimeOutFlag : Boolean;
FWait : TWait;
FWSocket : TWSocket;| Constructors |
constructor Create(AOwner : TComponent);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
| Functions |
function Abort : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function Connect : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
destructor Destroy;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function Mail : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function Quit : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function Rset : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ClearErrorMessage;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure DataSent(Sender : TObject; Error : WORD);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure Display(Msg : String);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure EndUUEncode(var hFile: File);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function GetResponse : Integer;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure InitUUEncode(var hFile: File; sFile: string);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} {$I+} { Activate I/O check (EInOutError exception generated) } {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure Notification(AComponent: TComponent; Operation: TOperation);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SendCommand(Cmd : String);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SendHeaderLine(Line : PChar; Size : Integer);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SessionClosed(Sender : TObject; Error : WORD);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SetErrorMessage;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SetRcptName(newValue : TStrings);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SetWait(Value : TWait);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerGetData(LineNum : Integer;
MsgLine : PChar;
MaxLen : Integer;
var More : Boolean);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerHeaderLine(Line : PChar; Size : Integer);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerProcessHeader(HdrLines : TStrings);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function WaitResponse(ValidResponse : integer; CloseOnError : Boolean) : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Wait for a response and check for validity. If response is not valid, } { return TRUE and optionnaly close the socket.
function WaitResponse2(ValidResponse1 : Integer;
ValidResponse2 : Integer;
CloseOnError : Boolean) : Boolean;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Wait for a response and check for validity. If response is not valid, } { return TRUE and optionnaly close the socket.
procedure WaitTimeOut(Sender : TObject);* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
| Properties |
property WSocket : TWSocket
property CharSet : String
property ErrorMessage : String
property FromName : String
property HdrFrom : String
property HdrSubject : String
property HdrTo : String
property Host : String
property LastResponse : String
property Port : String
property RcptName : TStrings
property SignOn : String
property Tag : LongInt
property TimeOut : Integer
property Wait : TWait| Events |
event OnDisplay : TSmtpDisplay
event OnGetData : TSmtpGetDataEvent
event OnHeaderLine : TSmtpHeaderLineEvent
event OnProcessHeader : TSmtpProcessHeaderEvent| Variables |
FCharSet : String;
FDataSentFlag : Boolean;
FErrorMessage : String;
FFromName : String;
FHdrFrom : String;
FHdrSubject : String;
FHdrTo : String;
FHost : String;
FLastResponse : String;
FOnDisplay : TSmtpDisplay;
FOnGetData : TSmtpGetDataEvent;
FOnHeaderLine : TSmtpHeaderLineEvent;
FOnProcessHeader : TSmtpProcessHeaderEvent;
FPort : String;
FRcptName : TStrings;
FSignOn : String;
FState : TSmtpState;
FTag : LongInt;
FTimeout : Integer;
FTimeOutFlag : Boolean;
FWait : TWait;
FWSocket : TWSocket;