Indy 9
|
TIdNNTP = class(TIdMessageClient)
NNTP is used for distributing messages publicly to central locations on a network.
property Mode: TModeType;
When Mode contains the the value mtReader, the client connection is an NNTP newsreader that will used the conversational nature of the NNTP protocol during protocol exchanges.
When Mode contains the the value mtStream, the client connection wishes to suspend the conversational nature of NNTP, and send a stream of NNTP commands. mtStream is used with TakeThis, where articles are sent to an NNTP server in streaming mode.
mtReader is the default value for Mode, as assigned in the Create constructor.
property ModeResult: TModeSetResult;
When Mode contains the value mtStream, ModeResult will contain one the values:
When Mode contains the value mtReader, ModeResult will contain one the values:
property MsgCount: Integer;
Use MsgHigh and MsgLow to access the message number ranges for the currently selected newsgroup.
property MsgHigh: Integer;
Use MsgLow to access the lower message number range for the currently selected newsgroup. Use MsgCount to get total number of messages in the currently selected newsgroup.
property MsgLow: Integer;
Use MsgHigh and MsgLow to access the message number ranges for the currently selected newsgroup.
property NewsAgent: string;
property OnNewGroupsList: TEventNewsGroupList;
Applications must assigned a procedure to the event handler when TStrings is not used to store the newsgroup listing. If the event handler is unassigned, a EIdNNTPNoOnNewGroupsList exception will be raised. The event handler can be used to update the stored newsgroup list on the NNTP client using values in the event handler arguments. Setting ACanContinue to False stops the newsgroup retrieval.
property Password;
Username and Password are used when SendCmd encounters NNTP response codes 450 and 480 when executing NNTP protocol commands. Values in Username and Password are send to the server using the NNTP service extension AUTHINFO.
property Permission: TIdNNTPPermission;
Permission is updated when Connect is used to open a connection to NNTP server and read the herald message.
property Port: integer;
property Username;
Username and Password are used when SendCmd encounters NNTP response codes 450 and 480 when executing NNTP protocol commands. Values in Username and Password are send to the server using the NNTP service extension AUTHINFO.
procedure Check(AMsgIDs: TStringList; var AResponses: TStringList);
AMsgIDs should contain one message identifier per line for each message to be checked. Check calls SendCmd using the NNTP CHECK command for each value in AMsgIDs. Check does not wait for a server response after each CHECK command, but reads the expected number of responses prior to exiting from the method.
AResponses will contain the responses received for the message identifiers in AMsgIDs. Use AResponses to determine which messages should be sent to the server. Server responses can include the following values and associated meanings:
Responses in the form X3X will include the message identifier in the text of the response.
Check will raise an EIdNNTPStringListNotInitialized exception if AResponses is not a valid TStrings instance.
For some NNTP server implementations, use of Check is optional prior to message transmission when Mode contains the value mtStream. The NNTP client can send all message identifiers using the TakeThis method.
procedure Connect(const ATimeout: Integer = IdTimeoutDefault); override;
Connect will raise an EIdNNTPConnectionRefused exception when the numeric response code in LastCmdResult is 502, indicating that the connection request was explicitly refused by the NNTP server. Note: If an Exception is encountered, Connect will call the Disconnect method and re-raise the exception.
Connect will also attempt to set the mode for the NNTP client connection using the NNTP MODE command and the TModeType value in the Mode property. Connect stores the result of the Mode request in the ModeResult property.
When Mode contains mtStream, ModeResult receives the value mrCanStream if the LastCmdResult contains the numeric value 203. Any other numeric response code causes ModeResult to contain mrNoStream.
When Mode contains mtReader, ModeResult receives the value mrCanPost if the LastCmdResult contains the numeric value 200. Any other numeric response code causes ModeResult to contain mrNoPost.
constructor Create(AOwner: TComponent); override;
procedure Disconnect; override;
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetArticle(AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetArticle(AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetArticle(AMsg: TStream): Boolean; overload; function GetArticle(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetArticle(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetArticle functions also provide for storing the contents of the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetArticle with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetArticle with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetArticle calls ReceiveHeader and ReceiveBody using AMsg as an argument. When TStrings or TStream are used as the destination, GetArticle calls Capture 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:
Use SelectGroup to select the active newsgroup before 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetBody(AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetBody(AMsg: TStrings): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetBody(AMsg: TStream): Boolean; overload; function GetBody(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetBody(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetBody functions also provide for storing the body lines for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetBody with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetBody with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
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. 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. When a TStream descendant is used as the destination, GetBody 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:
Use SelectGroup to select the active newsgroup before prior to 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.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
function GetHeader(AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TIdMessage): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TIdMessage): Boolean; overload; function GetHeader(AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStrings): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStrings): Boolean; overload; function GetHeader(AMsg: TStream): Boolean; overload; function GetHeader(const AMsgNo: Integer; AMsg: TStream): Boolean; overload; function GetHeader(const AMsgID: string; AMsg: TStream): Boolean; overload;
where the complete article should be stored.
TStrings where the complete article should be stored.
Stream where the complete article should be stored.
The overloaded GetHeader functions also provide for storing the message headers for the selected article in a TIdMessage instance, as text in a TStrings instance, or as values written to a TStream descendant. When using GetHeader with a numeric article index, the NNTP current article pointer is set to the indicated article. When using GetHeader with a message identifier string, the NNTP current article pointer is NOT set to the indicated article.
When a TIdMessage instance is used as the destination, GetHeader clears the contents of the message using TIdMessage.Clear and calls ReceiveHeader using AMsg as an argument. When TStrings is used as the destination, GetHeader clears the contents of the message using TStrings.Clear and calls Capture using AMsg as an argument. When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument.
The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received:
Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 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 GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article.
Use XOVER to get information from the overview database for one or more NNTP articles.
procedure GetNewGroupsList(const ADate: TDateTime; const AGMT: boolean; const ADistributions: string); overload; procedure GetNewGroupsList(const ADate: TDateTime; const AGMT: boolean; const ADistributions: string; AList: TStrings); overload;
ADate represents the date and time that the newsgroup list on the NNTP client was last updated, and is used to determine which groups in list have been added since that update.
When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When AGMT is False, the value in ADate represents a value for the local time-zone.
ADistributions is an optional string containing a comma-delimited list of newsgroup prefixes to be used as a filter when retrieving the list of news newsgroups. For example, the following would limit newsgroup retrieval to the public Delphi andf C++ Builder hierarchy:
'borland.public.delphi,borland.public.cppbuilder'
AList is an optional TStrings value to be used as the destination for new newsgroups retrieved from the NNTP server. When AList is assigned, GetNewGroupsList calls SendCmd using the NNTP NEWGROUPS command with the arguments specified. GetNewGroupsList calls Capture to store the server response lines in AList. Each line in AList is in the form:
groupname last first p
Where the tokens in the response lines have the following meanings:
When AList is omitted, the OnNewGroupsList event handler is used to signal receipt and processing of individual lines from the new newsgroup list. Applications must assign a TEventNewsgroupList event handler to the property to allow responding to the notification. GetNewGroupsList will raise an EIdNNTPNoOnNewGroupsList exception if both AList and OnNewGroupsList are unassigned.
procedure GetNewGroupsList(const ADate: TDateTime; const AGMT: boolean; const ADistributions: string); overload; procedure GetNewGroupsList(const ADate: TDateTime; const AGMT: boolean; const ADistributions: string; AList: TStrings); overload;
ADate represents the date and time that the newsgroup list on the NNTP client was last updated, and is used to determine which groups in list have been added since that update.
When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When AGMT is False, the value in ADate represents a value for the local time-zone.
ADistributions is an optional string containing a comma-delimited list of newsgroup prefixes to be used as a filter when retrieving the list of news newsgroups. For example, the following would limit newsgroup retrieval to the public Delphi andf C++ Builder hierarchy:
'borland.public.delphi,borland.public.cppbuilder'
AList is an optional TStrings value to be used as the destination for new newsgroups retrieved from the NNTP server. When AList is assigned, GetNewGroupsList calls SendCmd using the NNTP NEWGROUPS command with the arguments specified. GetNewGroupsList calls Capture to store the server response lines in AList. Each line in AList is in the form:
groupname last first p
Where the tokens in the response lines have the following meanings:
When AList is omitted, the OnNewGroupsList event handler is used to signal receipt and processing of individual lines from the new newsgroup list. Applications must assign a TEventNewsgroupList event handler to the property to allow responding to the notification. GetNewGroupsList will raise an EIdNNTPNoOnNewGroupsList exception if both AList and OnNewGroupsList are unassigned.
procedure GetNewNewsList(const ANewsgroups: string; const ADate: TDateTime; const AGMT: boolean; ADistributions: string); overload; procedure GetNewNewsList(const ANewsgroups: string; const ADate: TDateTime; const AGMT: boolean; ADistributions: string; AList: TStrings); overload;
ANewsgroups can contain a value that identifies the name or search patterns used in locating newsgroups to be included in the list of new message identifiers. ANewsgroups can contain the '*' (asterisk) indicating that the search will match any newsgroup name matching fixed portions of the search value. Multiple newsgroup names or search patterns may be specified as a comma-delimited list. Note: Implementors are cautioned to remember the 512 character command length limit in NNTP commands.
For instance, 'net.micro*' will match 'net.micro.wombat', 'net.micro.apple', etc. In addition, 'net.*.unix' would match newsgroups with names like 'net.wombat.unix' and 'net.whocares.unix'.
If only an asterisk character is given in ANewsgroups , all newsgroups will be searched for new message identifiers. If no asterisk appears in a given newsgroup name, only the specified newsgroup will be searched for new articles.
ANewsgroups may also contain an exclamation point ('!') character used to negate a match, and omit newsgroups matching the specified names or search patterns. For example, a newsgroups specification of 'net.*,mod.*,!mod.map.*' would specify that all groups starting with 'net.' or 'mod.' except newsgroups starting with 'mod.map.' would be matched. If used, the exclamation point must appear as the first character of the given newsgroup name or pattern.
ADate represents the date and time to be used in determining which message identifiers are included in the list of new articles.
When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When AGMT is False, the value in ADate represents a value for the local time-zone.
ADistributions is an optional string containing a comma-delimited list of newsgroups or prefixes to be used as a filter when retrieving the list new articles. Only those articles which have at least one newsgroup belonging to the list of distributions will be returned in the list of new articles.
AList is an optional TStrings value to be used as the destination for new message identifiers retrieved from the NNTP server. When AList is assigned, GetNewNewsList calls SendCmd using the NNTP NEWNEWS command with the arguments specified. GetNewNewsList calls Capture to store the server response lines in AList. Each line in AList will contain one message identifier.
When AList is omitted, the OnNewNewsList event handler is used to signal receipt and processing of individual message identifiers from the new articles list. Applications must assign a TEventNewNewsList event handler to the property to allow responding to the notification. GetNewNewsList will raise an EIdNNTPNoOnNewNewsList exception if both AList and OnNewNewsList are unassigned.
procedure GetNewNewsList(const ANewsgroups: string; const ADate: TDateTime; const AGMT: boolean; ADistributions: string); overload; procedure GetNewNewsList(const ANewsgroups: string; const ADate: TDateTime; const AGMT: boolean; ADistributions: string; AList: TStrings); overload;
ANewsgroups can contain a value that identifies the name or search patterns used in locating newsgroups to be included in the list of new message identifiers. ANewsgroups can contain the '*' (asterisk) indicating that the search will match any newsgroup name matching fixed portions of the search value. Multiple newsgroup names or search patterns may be specified as a comma-delimited list. Note: Implementors are cautioned to remember the 512 character command length limit in NNTP commands.
For instance, 'net.micro*' will match 'net.micro.wombat', 'net.micro.apple', etc. In addition, 'net.*.unix' would match newsgroups with names like 'net.wombat.unix' and 'net.whocares.unix'.
If only an asterisk character is given in ANewsgroups , all newsgroups will be searched for new message identifiers. If no asterisk appears in a given newsgroup name, only the specified newsgroup will be searched for new articles.
ANewsgroups may also contain an exclamation point ('!') character used to negate a match, and omit newsgroups matching the specified names or search patterns. For example, a newsgroups specification of 'net.*,mod.*,!mod.map.*' would specify that all groups starting with 'net.' or 'mod.' except newsgroups starting with 'mod.map.' would be matched. If used, the exclamation point must appear as the first character of the given newsgroup name or pattern.
ADate represents the date and time to be used in determining which message identifiers are included in the list of new articles.
When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When AGMT is False, the value in ADate represents a value for the local time-zone.
ADistributions is an optional string containing a comma-delimited list of newsgroups or prefixes to be used as a filter when retrieving the list new articles. Only those articles which have at least one newsgroup belonging to the list of distributions will be returned in the list of new articles.
AList is an optional TStrings value to be used as the destination for new message identifiers retrieved from the NNTP server. When AList is assigned, GetNewNewsList calls SendCmd using the NNTP NEWNEWS command with the arguments specified. GetNewNewsList calls Capture to store the server response lines in AList. Each line in AList will contain one message identifier.
When AList is omitted, the OnNewNewsList event handler is used to signal receipt and processing of individual message identifiers from the new articles list. Applications must assign a TEventNewNewsList event handler to the property to allow responding to the notification. GetNewNewsList will raise an EIdNNTPNoOnNewNewsList exception if both AList and OnNewNewsList are unassigned.
procedure GetNewsgroupList; overload;
The overloaded GetNewsgroupList procedures provide for handling NNTP server response lines using the OnNewsgroupList event handler, or storing server responses in either the AList or the AStream arguments.
When GetNewsgroupList is called with no parameters, the OnNewsgroupList event handler is used to process receipt of individual response lines containing newsgroup information. Applications must assign a TEventNewsgroupList event handler to the OnNewsgroupList property to allow responding to the notification. An EIdNNTPNoOnNewsgroupList will be raised if the event handler is unassigned.
When GetNewsgroupList is called with a TStrings argument, newsgroup information is stored in AList using Capture. Use ParseNewsGroup to return component values from lines in AList.
When GetNewsgroupList is called with a TStream argument, newsgroup information is stored in AStream using Capture.
Newsgroup information returned in an NNTP server response consists of multiple lines of text in the form:
groupname last first p
Where the tokens in the response lines have the following meanings:
procedure GetNewsgroupList(AList: TStrings); overload; procedure GetNewsgroupList(AStream: TStream); overload;
The overloaded GetNewsgroupList procedures provide for handling NNTP server response lines using the OnNewsgroupList event handler, or storing server responses in either the AList or the AStream arguments.
When GetNewsgroupList is called with no parameters, the OnNewsgroupList event handler is used to process receipt of individual response lines containing newsgroup information. Applications must assign a TEventNewsgroupList event handler to the OnNewsgroupList property to allow responding to the notification. An EIdNNTPNoOnNewsgroupList will be raised if the event handler is unassigned.
When GetNewsgroupList is called with a TStrings argument, newsgroup information is stored in AList using Capture. Use ParseNewsGroup to return component values from lines in AList.
When GetNewsgroupList is called with a TStream argument, newsgroup information is stored in AStream using Capture.
Newsgroup information returned in an NNTP server response consists of multiple lines of text in the form:
groupname last first p
Where the tokens in the response lines have the following meanings:
procedure GetNewsgroupList(AList: TStrings); overload; procedure GetNewsgroupList(AStream: TStream); overload;
The overloaded GetNewsgroupList procedures provide for handling NNTP server response lines using the OnNewsgroupList event handler, or storing server responses in either the AList or the AStream arguments.
When GetNewsgroupList is called with no parameters, the OnNewsgroupList event handler is used to process receipt of individual response lines containing newsgroup information. Applications must assign a TEventNewsgroupList event handler to the OnNewsgroupList property to allow responding to the notification. An EIdNNTPNoOnNewsgroupList will be raised if the event handler is unassigned.
When GetNewsgroupList is called with a TStrings argument, newsgroup information is stored in AList using Capture. Use ParseNewsGroup to return component values from lines in AList.
When GetNewsgroupList is called with a TStream argument, newsgroup information is stored in AStream using Capture.
Newsgroup information returned in an NNTP server response consists of multiple lines of text in the form:
groupname last first p
Where the tokens in the response lines have the following meanings:
procedure GetOverviewFMT(var AResponse: TStringList);
The OVERVIEW.FMT file is maintained by some news transport systems to indicate the order in which header information is stored in the overview databases for each newsgroup.
GetOverviewFMT captures the news article header fields in the order specified in the overview database, and stores the server responses in AResponse. If the NNTP server does not implement the LIST OVERVIEW.FMT the server will return a numeric response code of 503 in the LastCmdResult property.
procedure IHAVE(AMsg: TStringList);
IHAVE calls SendCmd using the NNTP IHAVE command and the 'Message-Id' header extracted from AMsg. If the server desires a copy of that article, it will return a numeric response code 335 instructing the client to send the contents of AMsg by writing the RFC contents of the message. If the server does not want the article, a numeric response indicating that the article is not wanted will be returned (435, 436, 437).
Note: IHAVE is intended for use in transferring already-posted articles between NNTP hosts. IHAVE is not normally used or permitted in NNTP client applications. IHAVE allows the NNTP message transport to perform negotiated article transmissions for articles already posted to the local NNTP host.
Some NNTP server implementations may not be able to decide immediately that an article is inappropriate for posting or forwarding, and may acknowledge the successful transfer of an article that may be subsequently discarded.
function Next: Boolean;
procedure ParseNewsGroup(ALine: String; var ANewsGroup: String; var AHi: Integer; var ALo: Integer; var AStatus: String);
ALine is a single line retrieved in the NNTP group response that contains the values to be parsed into the corresponding variable parameters ANewsgroup, AHi, ALo, and AStatus.
ANewsgroup is the name of a newsgroup returned in the NNTP response line.
AHi is the highest (or last) article number currently known to the newsgroup.
ALo is the lowest (or first) article number currently known to the newsgroup.
AStatus is the optional posting status information returned for the newsgroup, and normally contains the a 'y' or 'n' value. 'y' indicates that posting is allowed to the newsgroup. 'n' indicates that posting is prohibited to the newsgroup. Note: On some NNTP server implementations, a value like 'm' may occur in AStatus to indicate that moderated posting is permitted.
Parsed values in ANewsgroup, AHi, ALo, and AStatus are subsequently provided as parameters to the OnNewsgroupList and OnNewGroupsList event handlers.
procedure ParseXOVER(Aline: String; var AArticleIndex: Integer; var ASubject: String; var AFrom: String; var ADate: TDateTime; var AMsgId: String; var AReferences: String; var AByteCount: Integer; var ALineCount: Integer; var AExtraData: String);
AArticleIndex is the NNTP article number for the message.
ASubject is the subject header for the article.
AFrom is the author of the article.
ADate is the posting date for the article. Note: ADate is converted from GMT to a representation in the the local timezone during parsing.
AMsgId is the NNTP message identifier for the article.
AReferences is a list of message identifers that indicate the threading hierarchy for the article.
AByteCount is the size of the article in bytes.
ALineCount is the number of lines in the body of the article.
AExtraData contains optional fields as indicated by the NNTP LIST OVERVIEW.FMT command.
ParseXOver can be used in the OnNewNewsList event handler when the NNTP client needs to examine individual elements returned in an XOver response line.
procedure Post(AMsg: TIdMessage); overload; procedure Post(AStream: TStream); overload;
Post calls SendCmd using the NNTP POST command to request a posting transaction on the the NNTP server. When the numeric response code from the server is 440, posting is prohibited on the server or newsgroup. When the server response is 340, posting is allowed on the newsgroup. When posting is allowed, Post will send message data using the AMsg or AStream argument provided to the method.
When AMsg is used as the source for message data, Post will insure that the TIdMessage.ExtraHeaders property contains the value of Newsagent in the 'X-Newsreader' message header. The TIdMessage in AMsg is sent to the server using SendMsg.
When AStream is used as the source for message data, Post will send the content of the stream to the server using WriteStream.
Numeric response code 240 indicates that the article was successfully posted to the NNTP server.
procedure Post(AMsg: TIdMessage); overload; procedure Post(AStream: TStream); overload;
Post calls SendCmd using the NNTP POST command to request a posting transaction on the the NNTP server. When the numeric response code from the server is 440, posting is prohibited on the server or newsgroup. When the server response is 340, posting is allowed on the newsgroup. When posting is allowed, Post will send message data using the AMsg or AStream argument provided to the method.
When AMsg is used as the source for message data, Post will insure that the TIdMessage.ExtraHeaders property contains the value of Newsagent in the 'X-Newsreader' message header. The TIdMessage in AMsg is sent to the server using SendMsg.
When AStream is used as the source for message data, Post will send the content of the stream to the server using WriteStream.
Numeric response code 240 indicates that the article was successfully posted to the NNTP server.
function Previous: Boolean;
function SelectArticle(const AMsgNo: Integer): Boolean;
Use SelectGroup to activate a specific newsgroup prior to using SelectArticle.
procedure SelectGroup(const AGroup: string);
Use SelectGroup prior to retrieving articles from the NNTP server.
function SendCmd(const AOut: string; const AResponse: Array of SmallInt): SmallInt; override;
SendCmd performs default error handling by calling CheckResponse. An EIdResponseError exception will be raised when a valid response is expected and the result, from either the inherited SendCmd or from the authentication of User and Password information, does not match the expected response code(s).
function TakeThis(const AMsgID: string; AMsg: TStream): string;
AMsgID contains the message identifer for the news article to be transmitted. AMsg is a stream containing the contents of the news article including message headers and body.
TakeThis calls SendCmd using the value in AMsgID to begin streaming article transmission. TakeThis writes the message contents in AMsg to the server using WriteStream.
procedure XHDR(const AHeader: string; const AParam: string; AResponse: TStrings);
AHeader can contain any of the following values for an RFC 1036-compliant server:
The following headers may or may not work depending on the server configuration. Also, it should be noted that servers can and many do have local header definitions. If you know what these header designations are you can of course pass them in the AHeader argument.
The range of articles to be searched is specifies by the AParm argument. AParm must be in the following forms:
For example, if the following values of AParm would result in the corresponding action:
Note: Article numbers are transitory. This means that you may specify a range of article numbers, such as 1-5, and you may receive only articles 1,3 and 4. This does not mean you have done anything wrong. The missing articles may have been expired (removed from the server), or for some other reason not under your control have become unavailable.
The response(s) from the server are stored in AResponse. Note: You must have previously executed the SelectGroup command in order for this command to return a meaningful response.
AParm can be an article index such as "1", an article index followed by a dash to indicate the index and all articles following it such as "1-", or a range of articles such as "1-10".
You can parse the results using the ParseXOVER procedure in the IdNNTP unit. You sometimes can parse for additional information by getting the format of the overview database with the GetOverviewFMT method.
You have to use SelectGroup to select the newsgroup before using this method.
procedure XOVER(const AParam: string; AResponse: TStrings); overload; procedure XOVER(const AParam: string; AResponse: TStream); overload;
AParm can be an article index such as "1", an article index followed by a dash to indicate the index and all articles following it such as "1-", or a range of articles such as "1-10".
You can parse the results using the ParseXOVER procedure in the IdNNTP unit. You sometimes can parse for additional information by getting the format of the overview database with the GetOverviewFMT method.
You have to use SelectGroup to select the newsgroup before using this method.
property OnNewNewsList: TEventNewNewsList;
Applications must assigned a procedure to the event handler when TStrings is not used to store the new article listing. If the event handler is unassigned, an EIdNNTPNoOnNewNewsList exception will be raised. The event handler can be used to update display or storage aspects of the NNTP client when new articles message identifiers are received. Setting ACanContinue to False stops retrieval of the new article list.
property OnNewsgroupList: TEventNewsgroupList;
Applications must assigned a procedure to the event handler when TStrings is not used to store the newsgroup listing. If the event handler is unassigned, a EIdNNTPNoOnNewsgroupList exception will be raised. The event handler can be used to update the stored newsgroup list on the NNTP client using values in the event handler arguments. Setting ACanContinue to False stops the newsgroup retrieval.