Post a new article to the current newsgroup.
Syntax
object.PostArticle( Message,
[Options] )
Remarks
The PostArticle method is used to submit the contents of
the specified buffer to the server as a new article in the current
newsgroup. This method will cause the current thread to block until
the article transfer completes, a timeout occurs or the transfer is
canceled. During the transfer, the OnProgress event will
fire periodically, enabling the application to update any user
interface objects such as a progress bar.
- Message
- A string or byte array which will contain the article to be
posted to the server.
- Options
- An optional integer value which specifies one or more options.
This argument is reserved for future use and should be
omitted.
Not all newsgroups permit new articles to be posted, and some
newsgroups may require that you email the article to a moderator
for approval instead of posting directly to the group. It may be
required that the client authenticate itself using the
Authenticate method prior to posting the article.
A news article is similar to an email message in that it
contains one or more header fields, followed by an empty line,
followed by the body of the article. Each line of text should be
terminated by a carriage return/linefeed sequence of characters.
The Mail Message control can be used to compose a message if
needed. Note that the article header must contain a header field
named "Newsgroups" with a value that specifies the newsgroup or
newsgroups the article is being posted to. If this header field is
missing, the news server will reject the article.
Return Value
A value of zero is returned if the operation was successful,
otherwise a non-zero error code is returned which indicates the
cause of the failure.
See Also
Authenticate Method, GetArticle Method, GetHeaders Method, OnProgress Event
|