Topic Path: Symbol Reference > Classes > TIdNNTP Class > TIdNNTP Methods > GetArticle Method > GetArticle Method (Integer, TIdMessage)
TIdNNTP.GetArticle Method (Integer, TIdMessage)

Retrieves a complete NNTP article.

function GetArticle(
    AMsgNo: Integer; 
    AMsg: TIdMessage
): Boolean; overload;
Index number for the article.
TIdMessage where the complete article should be stored. 

Boolean - True if the article is successfully retrieved.

GetArticle is an overloaded Boolean function in TIdNNTP used to retrieve a complete NNTP article including the headers and body. 

GetArticle calls SendCmd to issue the NNTP ARTICLE command used to perform article retrieval using the message number in AMsgNo to store the NNTP article in the message instance specified in AMsg. AMsg is cleared prior to retrieval of the NNTP article. 

The NNTP current article pointer is set to the indicated article. 

GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. 

The return value for GetArticle is True when the numeric response from SendCmd is 220. GetArticle 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 prior to calling GetArticle. 

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 GetBody to retrieve the body text for a specific NNTP article.

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