Re: TIdSMTP - reinitialize ?

Giganews Newsgroups
Subject: Re: TIdSMTP - reinitialize ?
Posted by:  Dmitry Mikhilov (d…
Date: Sun, 6 Jul 2003

Try using wininet.lib (just add it to your project) and function:

bool TestInternet(bool autoconnect)
DWORD flags;
return InternetGetConnectedState(&flags,0) || autoconnect &&

Returns true if connection is (was previously) established. When all the job
is done, just perform InternetAutodialHangup(0)
But this function will break the connection only if default connection is
specified in your IE settings.


"Andrew Jameson" <conta…> wrote:
> If I post mail when not connected, I get the dial-up dialog ... just what
> want ... but if I cancel, I then get a socket error 11001 ... that makes
> perfect sense too ... but if I try to post again, I no longer get the
> dial-up dialog and immediately get the 11001 error.  Is there way to
> reinitialize so that it'll always bring up the dial-up dialog if not
> connected ?


In response to

TIdSMTP - reinitialize ? posted by Andrew Jameson on Sun, 6 Jul 2003