Using TidSMTP.Send - disappears never to return

Giganews Newsgroups
Subject: Using TidSMTP.Send - disappears never to return
Posted by:  David Perkins (no@spam.com)
Date: Fri, 06 May 2005

Hello

I have developed an NT Service (using BCbv5) which uses the TidSMTP
(v9.0.1.8) component to send emails, with and without attachments.

One client is experiencing problems with this Service.  They use a
dial-up account which is initiated via their router.  The problem:

I connect to the web and enter a for loop to send a few emails, whilst
sending email no (eg) 4, it appears to call TidSMTP.Send and never comes
back.  I have code that looks like this:

try
{
    Log("1");
    PSMTP->Send(...);
    Log("2");
}
catch(Exception& e)
{
  Log( e.Message );
}

The debug log file contains something like:

1
2
1
2
1
2
1

and then nothing.  No exception is thrown, it appears never to return
from smtp->Send.  This code works fine elsewhere and used to work fine
at the client in question.  However, two weeks ago, their ISP's mail
server went down for 3 days and since it's return, smtp->Send has been
playing up.

I dynamically create a TidSMTP object as follows, everything else is
default.

  pSMTP = new TIdSMTP(0);
  pSMTP->MailAgent = "MsgServer";
  pSMTP->Host = String( pszHost );
  pSMTP->MsgLineLength = 600;

I'm stumped as to what to try next, any suggestions greatly received.

TIA

David

Replies