Internet Direct (Indy)
Home
PreviousUpNext
TIdNNTP.GetBody Method (Integer, TIdMessage)

Retrieves the body for an NNTP article.

Pascal
function GetBody(
    AMsgNo: Integer; 
    AMsg: TIdMessage
): Boolean; overload;
Parameters 
Description 
AMsgNo 
Index number for the article.
 
AMsg 
TIdMessage where the article should be stored. 

Boolean - True on success, False on protocol or server error.

GetBody is an overloaded Boolean function in TIdNNTP used to retrieve the message body for a NNTP article. 

AMsgNo is the relative article index number for the NNTP article. 

AMsg is the TIdMessage instance where the body of the NNTP article will be stored. 

When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. 

GetBody calls SendCmd using the NNTP BODY command to retrieve body lines. When a TIdMessage instance is used as the destination, GetBody clears the contents of the message using TIdMessage.Clear and calls ReceiveBody using AMsg as an argument. 

The return value for GetBody is True when the numeric response from SendCmd is 222. GetBody will return False if any of the following responses are received: 

 

Code 
Meaning 
412 
no newsgroup has been selected 
420 
no current article has been selected 
423 
no such article number in this group 
430 
no such article found 

 

Use SelectGroup to select the active newsgroup before calling GetBody. 

Use SelectArticle to set the current article pointer for the active newsgroup. 

Use GetNewNewsList to get a list of articles added since a specified date and time. 

Use GetHeader to retrieve the headers for a specific NNTP article. 

Use GetArticle to retrieve the entire contents of a specific NNTP article.

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.