OnWork event not fired by TIdSMTP

Giganews Newsgroups
Subject: OnWork event not fired by TIdSMTP
Posted by:  Daniel (dt…@pacific.net.sg)
Date: Fri, 11 Jun 2004

Hi,

I'm using Indy 10.0.18-B for Delphi 7.  I've created a simple
application with a TIdSMTP component to send out emails.  It uses the
default auth type and login is fine.

I assign procedures to OnWork, OnWorkBegin and OnWorkEnd events to
keep track of the progress.

I manually create an TIdMessage as follows:

cMsg := TIdMessage.Create(nil);
cMsg.Recipients.EMailAddresses := ...
{and the subject, sender info, etc}

cMsg.Body.AddStrings(cContents);  // where cContents is of
TStringList type

after that I connect to the SMTP server and send out email as follows:

  cSMTP.Connect;
  cSMTP.Send(cMsg);

while sending the email, OnWork event is not fired at all.  Using
similar approach with TIdPOP3, the OnWork event is fired when
retrieving emails.

Any help is appreciated.  TIA.

Regards,
Daniel

Replies