unit uMailConnectionDataModule;
interface
uses
SysUtils, Classes, IdSMTPServer, IdSMTP, IdTCPServer, IdPOP3Server,
IdComponent, IdTCPConnection, IdTCPClient, IdMessageClient, IdPOP3,
IdBaseComponent, IdMessage, Sockets, IdThreadMgr, IdThreadMgrDefault;
type
TMailConnectionDataModule =
class(TDataModule)
POP3Client: TIdTCPClient;
POP3Server: TIdTCPServer;
private
{ Private-Deklarationen }
...
public
{ Public-Deklarationen }
function POP3ServerIsRunning : Boolean;
...
procedure POP3ServerStop;
...
end;
var
MailConnectionDataModule: TMailConnectionDataModule;
implementation
function TMailConnectionDataModule.POP3ServerIsRunning : Boolean;
begin
Result := POP3Server.Active
end;
procedure TMailConnectionDataModule.POP3ServerStop;
begin
POP3Server.Active := False
end;
end.