Internet Direct (Indy)
Home
PreviousUpNext
TIdMessage.NoDecode Property

Requests a message in raw form.

Pascal
property NoDecode: Boolean;

NoDecode is a Boolean property used to indicate that the message should be retrieved without decoding the contents of the message. The default value of NoDecode is False. 

When NoDecode is False, the message will be retrieved and added to MessageParts as text or attachments according to their MIME content types and transfer encodings. There can be one or more MessageParts (TIdText type) added for the message bodies, and additional MessagePart items (TIdAttachment type) for each message attachment. 

When NoDecode is True, the entire message will be retreived and stored in Body in its MIME-encoded form. No decoding based on Content Types or Tranfer Encodings are performed for the message or attachments.

(Delphi) Reading a message from a POP3 client. 

 

  AMsg.NoDecode := False;
  APOP3.Retrieve(1, AMsg);

  for i := 0 to Pred(AMsg.MessageParts.Count) do
  begin
    if (AMsg.MessageParts.Items[i] is TIdAttachment) then
    begin
      listviewAtt.Add(TIdAttachment(AMsg.MessageParts.Items[i]).Filename);
    end

    else
    begin
      if AMsg.MessageParts.Items[intIndex] is TIdText then
      begin
        memoBody.Lines.AddStrings(TIdText(AMsg.MessageParts.Items[i]).Body);
      end;
    end;
  end;
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.