Re: empty body

Giganews Newsgroups
Subject: Re: empty body
Posted by:  Ciaran Costelloe (ccostell…@flogas.ie)
Date: Thu, 6 May 2004

"Rhys Sage" <abuse@127.0.0.1> wrote in message
news:275F59D0299CE240abuse@127.0.0.1...
> 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);

I am no expert on POP, but I think RetrieveHeader only retrieves the header
lines of the email (check IdMessage1.Headers.Count) and not the body or the
parts.

Ciaran

> 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

In response to

empty body posted by Rhys Sage on Thu, 6 May 2004