<%@ Language=VBScript %> <% '****************************************************************************** 'Copyright Dundas Software Ltd. 2000. All Rights Reserved. ' 'PURPOSE: The user can post a news article(s) to a newsgroup. The ' article can be posted to the root of the news group or as ' a reply to an existing article. ' 'POST DESTINATION: PostArticle_Process.asp. ' 'INPUT: News group server, news group(s), Subject, Sender's ' email address, the article body and optional ID of ' the article to respond to. ' 'COMMENTS: A success message is displayed if the article was successfully ' posted. ' 'Dundas Software Contact Information: ' Email: sales@dundas.com ' Phone: (800) 463-1492 ' (416) 467-5100 ' Fax: (416) 422-4801 '****************************************************************************** %>

Note: you can post to multiple news groups by separating the news groups with commas. <% 'check to see if the article was successfully posted, if it ' was then display a short success message to the user. 'also retreive QueryString values so that we can populate the form's input elements Dim temp(5) 'this array is used to set Value attribute of form elements If Request.QueryString("Success") = "TRUE" Then Response.Write "

The previous article was successfully posted.
" 'now grab the querystring parameter which stores the form's element values Dim l For l = 1 To 5 temp(l - 1) = Request.QueryString("Value" & l) Next Else 'user loaded page for first time, so set temp array values to zero-length strings ' and also set default values for news server and news group temp(0) = "msnews.microsoft.com" temp(1) = "microsoft.public.test.here" For l = 2 To 4 temp(l) = "" Next End If %>

News group server: 

  *
News group(s) to post to:    *
ID of article to reply to (optional): 
Your email address:    *
Subject:    *

This demo posts a news article to a specified news group. We use this main page to retrieve data and then POST to an asp page named PostArticle_Process.asp, which uses the Mailer control to post the article. If the operation is successful you will be redirected back to this main page. If it is not successful you will be redirected to an error page.