Delphi-Quellcode:
procedure Tfrm_POP3SMTPTester.btn_SendMailClick(Sender: TObject);
var
m: TIdMessage;
begin
try
[ Gedöns ]
except
on E: EIdTextInvalidCount do
Writeln(E.Message);
on E: EIdMessageCannotLoad do
Writeln(E.Message);
on E: EIdPOP3Exception do
Writeln(E.Message);
on E: EIdTextInvalidCount do
Writeln(E.Message);
on E: EIdMessageCannotLoad do
Writeln(E.Message);
on E: EIdDoesNotSupportAPOP do
Writeln(E.Message);
on E: EIdUnrecognizedReply do
Writeln(E.Message);
on E: EIdTLSClientException do
Writeln(E.Message);
on E: EIdTLSClientSSLIOHandlerRequred do
Writeln(E.Message);
on E: EIdTLSClientCanNotSetWhileConnected do
Writeln(E.Message);
on E: EIdTLSClientTLSNotAvailable do
Writeln(E.Message);
on E: EIdTLSClientTLSNegCmdFailed do
Writeln(E.Message);
on E: EIdTLSClientTLSHandShakeFailed do
Writeln(E.Message);
on E: EIdTLSServerException do
Writeln(E.Message);
on E: EIdTLSClientCanNotSetWhileActive do
Writeln(E.Message);
end;
if IdSMTP1.Connected then
IdSMTP1.Disconnect;
end;
Warum nicht einfach gleich:
Delphi-Quellcode:
procedure Tfrm_POP3SMTPTester.btn_SendMailClick(Sender: TObject);
var
m: TIdMessage;
begin
try
[ Gedöns ]
except
on E:
Exception do
WriteLn(E.
Message);
end;
if IdSMTP1.Connected
then
IdSMTP1.Disconnect;
end;
?