Re: Some messages not being displayed

Giganews Newsgroups
Subject: Re: Some messages not being displayed
Posted by:  Ciaran Costelloe (ccostell…@flogas.ie)
Date: Thu, 6 May 2004

"Rhys Sage" <abuse@127.0.0.1> wrote in message
news:96E60734329CE240abuse@127.0.0.1...
> I have the following procedure using Indy 9.14. I'm getting problems in
that
> some email bodies

What exactly do you mean by bodies?  TIdMessage.Body will be empty for many
MIME messages (unless they have the preamble "This is a MIME encoded email"
or whatever), plus there are emails that have no message (files emailed from
applications, e.g. Excel?) apart from badly-formatted junk email.

> are just not being displayed. What might be the solution?

Upgrade to Indy 10 (free, open-source).  It handles some more possibilities
than Indy 9 anyway.

Also, post the raw email here.

> procedure TForm1.DisplayTextClick(Sender: TObject);
> var Kownt : Integer;
> begin
> IdMessage1.Clear;
> IdPOP31.Retrieve(ListBox1.ItemIndex+1,IdMessage1);
> if IdMessage1.MessageParts.Count = 0 then
>  begin
>  ShowMessage(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(TIdText(IdMessage1.MessageParts.Items[Kownt]).Body.Text);
>    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

Some messages not being displayed posted by Rhys Sage on Thu, 6 May 2004