TIdSMTP socket error

Giganews Newsgroups
Subject: TIdSMTP socket error
Posted by:  Man Utd (NOalanpltseSP…@yahoo.com.au)
Date: Fri, 6 May 2005

I tried to send email using TIdSMTP component, however, I got the error:
class EIdSocketError with message 'Socket Error #11004'

This occurred at when I connect the SMTP:

fSMTP := TIdSMTP.Create(nil);
mailMessage := TIdMessage.Create(nil);
with mailMessage do
begin
      Sender.DisplayName := 'Mandy';
      Sender.Address := '1…@hotmail.com';
      ReplyTo.EMailAddresses := '1…@hotmail.com';
      Subject := 'Testing';
      Recipients.EMailAddresses := 'howarey…@hotmail.com;
end;
fSMTP.Host := 'smtp.mycompany.com';
fSMTP.Port := 25;
fSMTP.Username := 'myname';
fSMTP.Password := 'mypassword';
fSMTP.Connect();
fSMTP.Send(mailMessage);

Any wrong with my code ?

Replies