POP3Server error

Giganews Newsgroups
Subject: POP3Server error
Posted by:  Marcello Scala (marcello.sca…@email.it)
Date: Thu, 17 Jul 2003

Hi All!

Why this simple source not work?

void __fastcall TForm1::FormActivate(TObject *Sender)
{
IdPOP3Server1->Active=true;

TMemoryStream* mms = new TMemoryStream();

IdMessage1->Clear();
IdMessage1->LoadFromFile("c:\\prova.txt",false); (this txt is a file
generate from IdMessage1->SaveToFile method)
IdMessage1->SaveToStream(mms,false);
mms->Seek(0,0);

}

......

//--------------------------------------------------------------------------
-
void __fastcall TForm1::IdPOP3Server1RETR(TIdCommand *ASender,
      int AMessageNum)
{

    ASender->Thread->Connection->WriteStream(mms); // send a Stream for
ever...without end
}

The Outlook Express receive a message but not stop....ever.

Why?

Thanks

Replies