Board index » delphi » NMSMTP.SendMail does not return to form

NMSMTP.SendMail does not return to form

Hi All

I am using the native Delphi 4 SMTP VCL to send my mails.... It all works
quite well except when my mail server breaks down in the middle of the
sending of the mail....

It seems that sendmail does not recognize the lost connection to the server
and does not return with an error.... It just continues to "send"......

It takes a three finger salute to end my application....

The following code is used with sendmail

  try
     NMSMTP1.SendMail;
  except
     MessageDlg('The message could not be sent or was aborted...',
mtInformation, [mbOk], 0);
     NMSMTP1.Abort;
  end;

It never arrives in the except section of my source...... Did anybody have
the same problem and found a solution ???

Cheers

Marcus

 

Re:NMSMTP.SendMail does not return to form


I am not very happy with the native (NetMasters) internet VCL components in
Delphi. Instead I use the freeware component from:

ICS (http://users.swing.be/francois.piette/indexuk.htm)

Or you could use:

WinShoes (http://www.pbe.com/WinShoes/)

ps. I can't test your problem, because I can't shut down my mail server.

"Marcus Holz" <mar...@ffb.com.sg> schreef in bericht
news:393c9db6@news.swiftech.com.sg...

Quote
> Hi All

> I am using the native Delphi 4 SMTP VCL to send my mails.... It all works
> quite well except when my mail server breaks down in the middle of the
> sending of the mail....

> It seems that sendmail does not recognize the lost connection to the
server
> and does not return with an error.... It just continues to "send"......

> It takes a three finger salute to end my application....

> The following code is used with sendmail

>   try
>      NMSMTP1.SendMail;
>   except
>      MessageDlg('The message could not be sent or was aborted...',
> mtInformation, [mbOk], 0);
>      NMSMTP1.Abort;
>   end;

> It never arrives in the except section of my source...... Did anybody have
> the same problem and found a solution ???

> Cheers

> Marcus

Other Threads