Topic Path: Pending > TIdNNTP.GetBody@string@TStrings

Retrieves the body for an NNTP article.

Message Identifier for the article.
TStrings 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. GetBody calls SendCmd using the NNTP BODY command to retrieve body lines. 

AMsgID is the Message Identifier for the NNTP article. 

AMsg is a TStrings instance where the body for the NNTP article should be stored. 

When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article. 

When TStrings is used as the destination, GetBody clears the contents of the message using TStrings.Clear and calls Capture 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: 


no newsgroup has been selected 
no current article has been selected 
no such article number in this group 
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.

TIdMessage SelectArticle SelectGroup GetNewNewsList GetHeader GetHeader GetArticle GetBody

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