title: Delphi + Indy: Connection closed gracefully
body: <p>Using D7 + Indy 10 latest build.</p>
  
  <p>My code is using TIdSMTP to send email. 
  I keep getting "Connection closed gracefully" at some end-users, and the email is never sent.</p>
  
  <p>The code is like:</p>
  
  <pre><code>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;
  </code></pre>
  
  <p>Any advice?</p>