This code is correct to send a TidMessage with a POP3Server?

Giganews Newsgroups
Subject: This code is correct to send a TidMessage with a POP3Server?
Posted by:  Marcello Scala (marcello.sca…@email.it)
Date: Tue, 15 Jul 2003

void __fastcall TForm1::IdPOP3Server1RETR(TIdCommand *ASender,
      int AMessageNum)
{
  std::auto_ptr<TStringList> XMessage( new TStringList );
  XMessage->LoadFromFile(  "somefile.txt" );
  if( XMessage->Count == 0
  || XMessage->Strings[ XMessage->Count - 1] != "." )
  {
    XMessage->Add( "." );
  }
  for( int nxx = 0;  n < XMessage.Count;  ++nxx )
  {
    ASender->Thread->Connection->WriteLn( XMessage->Strings[nxx] );
  }
}

And if this message i must retrive from a DB before to send with POP3Server,
i can do it?

Thanks

Replies