Topic Path: Symbol Reference > Classes > TIdMessageClient Class > TIdMessageClient Methods > ProcessMessage Method > ProcessMessage Method (TIdMessage, Boolean)
ContentsIndexHome
PreviousUpNext
TIdMessageClient.ProcessMessage Method (TIdMessage, Boolean)

Receives and processes message headers and contents into a TIdMessage instance.

procedure ProcessMessage(
    AMsg: TIdMessage; 
    AHeaderOnly: Boolean = False
); overload;
Parameters 
Description 
AMsg 
Message to receive header and contents.
 
AHeaderOnly 
Retrieve message headers only. Default is False. 

ProcessMessage is an overloaded method in TIdMessageClient that implements receiving and processing of message headers and contents from a file with the contents of the Internet message. 

ProcessMessage ensures that the IOHandler for the message client is assigned and initialized for the operation. 

The default implementation of ProcessMessage uses the IOHandler assigned to the client to receive the header and optional body of the message, and stores data in the message instance specified in AMsg. 

AHeaderOnly indicates that the message client will retrieve only the headers for the message, and will not populate the contents of the message body. The default behavior (when AHeaderOnly is False) is to retrieve the entire message including both header and body contents. 

ProcessMessage does not make any assumptions about the contents of the TIdMessage instance in AMsg. In other words, ProcessMessage does not call TIdMessage.Clear before receiving header or body content. The application must call TIdMessage.Clear when reusing a TIdMessage instance for message retrieval.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.