Sometimes is useful to have Telnet abbility. It can be simulate from
application using pop3.Sock, however it is more effective through direct
support by unit. Suggested code:
TPOP3Send = class(TSynaClient)
private
...
//SZ
function ReadRAWResult: Integer;
...
public
...
//SZ
{:Send command to the POP3 server and collect resut to FullResult - Telnet
abbility.}
function SendCommand(const Command:string): Boolean;
...
//SZ
function TPOP3Send.ReadRAWResult: Integer;
var
s: string;
begin
Result := 0;
FFullResult.Clear;
s := FSock.RecvString(FTimeout);
if Pos('+OK', s) = 1 then
Result := 1;
FResultString := s;
FFullResult.Clear;
repeat
FFullResult.Add(s);
s := FSock.RecvString(FTimeout);
until FSock.LastError <> 0;
FResultCode := Result;
end;
//SZ
function TPOP3Send.SendCommand(const Command:string): Boolean;
begin
FSock.SendString(Command + CRLF);
Result:=ReadRAWResult= 1;
end;
Sasa
--
www.szutils.net
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public