Exception

Giganews Newsgroups
Subject: Exception
Posted by:  duf (d…@wp.pl)
Date: Thu, 27 Mar 2008

How can I catch the exception if send message is incorrect?

try
{
  IdSMTP1->Connect();
  IdSMTP1->Send( IdMessage1 );
}
catch ( ... ) {

  //if ( exception ) MessageDlg( "something here", mtWarning , TMsgDlgButtons() << mbOK, 0 );
  IdSMTP1->Disconnect()
}

Replies