empty body

Giganews Newsgroups
Subject: empty body
Posted by:  Rhys Sage (abu…@127.0.0.1)
Date: Thu, 6 May 2004

I'm trying to read the messages. I keep getting a zero reading. Any ideas?
I've been using TSAKPOP recently.

procedure TForm1.Button5Click(Sender: TObject);
var Kownt : Integer;
begin
IdMessage1.Clear;
IdPOP31.RetrieveHeader(ListBox1.ItemIndex+1,IdMessage1);
if IdMessage1.MessageParts.Count = 0 then
  begin
  ShowMessage(IntToStr(Length(IdMessage1.Body.Text)));
  end
else
  begin
  for Kownt := 0 to IdMessage1.MessageParts.Count -1 do
  begin
  if IdMessage1.MessageParts.Items[Kownt] is TIdText then
ShowMessage('Text')
    else ShowMessage('other');
  //if IdMessage1.MessageParts.Items[Kownt] is Tidhtml then
ShowMessage('html');
  end;
  end;
end;

--
Yours

Rhys

Join the anti-spam project:
http://groups.yahoo.com/group/Anti-Spam-Development/
or view my website:
http://www.sageworld.org

"Linux - an operating system that wants to work.
Windows - an operating system that mostly works.
Mac OS - an operating system that really works."

Replies