MIME problem

Giganews Newsgroups
Subject: MIME problem
Posted by:  Rhys Sage (abu…@127.0.0.1)
Date: Tue, 24 Feb 2004

I'm trying to read POPped email and I can't read it in MIME format. I
enclose my code. What's the problem? All I'm trying to do is to read the
message body. The attachments don't interest me at all.

procedure TMailControl.DisplayEmail(Item : Integer);
var MessageNumber : Integer;
MyString : String;
begin
  RichEdit1.Lines.Clear;
  RichEdit4.Lines.Clear;
// download indicated email
if Pos('::',ListBox1.Items.Strings[ListBox1.ItemIndex]) > 0 then
  begin
  MyString := ListBox1.Items.Strings[Item];
  MessageNumber := StrToInt(Copy(MyString,1,Pos('::',MyString)-1));
  IdMessage1.Clear;
  IdPOP31.RetrieveMsgSize(MessageNumber);
  IdPOP31.Retrieve(MessageNumber,IdMessage1);
  RichEdit1.Lines.AddStrings(IdMessage1.Headers);
  RichEdit4.Lines.AddStrings(IdMessage1.Body);
  end
else ShowMessage('Unable to display');
end;

--
Yours

Rhys

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

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

Replies