Problem with Delphi 6 and attachments to Indy SMTP messages

I'm trying to send an email message with a text file attachment using
the Indy IdSMTP and IdMessage components (version 9.0.11).  The text
file is about 1K in size.  Sending the message without the attachment
works great every time, but as soon as I add the attachment to the
message (see line 4 below), I get socket error # 10054 - conection
reset by peer.  Any ideas?  Thanks in advance.

procedure TForm1.Button1Click(Sender: TObject);
begin
  idsmtp1.Connect;
  TIdAttachment.Create(IdMessage1.MessageParts, 'c:\w.txt');
  idsmtp1.Send(IdMessage1);
  idsmtp1.Disconnect;
end;