Re: MIME problem

Giganews Newsgroups
Subject: Re: MIME problem
Posted by:  Remy Lebeau (TeamB) (gambit47.no.spam@no.spam.yahoo.com)
Date: Tue, 24 Feb 2004

"Rhys Sage" <abuse@127.0.0.1> wrote in message
news:67F032552F93E240abuse@127.0.0.1...

>  RichEdit4.Lines.AddStrings(IdMessage1.Body);

If the message is MIME encoded, then you need to get the content from the
MessageParts collection instead of the Body, ie:

    var
        I: Integer;
    //...
        RichEdit1.Lines.AddStrings(IdMessage1.Headers);
        if (IdMessage1.MessageParts.Count > 0) then
        begin
            For I := 0 to Pred(IdMessage1.MessageParts.Count) do
            begin
                if (IdMessage1.MessageParts.Items[I] is TIdText) then begin

RichEdit4.Lines.AddStrings(TIdText(IdMessage1.MessageParts.Items[I]).Body);
                end;
            end;
        end else begin
            RichEdit4.Lines.AddStrings(IdMessage1.Body);
        end;
    //...

Gambit

Replies

None

In response to

MIME problem posted by Rhys Sage on Tue, 24 Feb 2004