Using D7 + Indy 10 latest build.
My code is using TIdSMTP to send email. I keep getting "Connection closed gracefully" at some end-users, and the email is never sent.
The code is like:
try
~~~~
~~~~
_idSMTP := TIdSmtp.Create;
with _idSMTP do
begin
Host := 'myhost';
Connect;
try
Send(_EmailMsg);
Result := True;
except
on E: Exception do
begin
MsgDlgErr(Self.Handle, E.Message)
end
end;
end;
finally
_idSMTP.Disconnect;
_idSMTP.Free;
end;
Any advice?