HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/bin/dundas/FreeLibs/AspMail/Samples/PostArticle.asp
<%@ 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
'******************************************************************************
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</head>
<body color="black" bgcolor="white">
<table><tr><td><img border="0" src="images/clouds.jpg" WIDTH="550" HEIGHT="36"></td></tr></table>
<span style="position: absolute; left: 574; top: 20; z-index: -1">
<img align="right" border="0" src="images/dundaslogo.gif" hspace="5" WIDTH="160" HEIGHT="18">
</span> <img border="0" src="images/headline.gif" WIDTH="390" HEIGHT="50"> 
<hr align="center" color="#0000FF" size="1">
<font size="2"><i>Note: you can post to multiple news groups by separating the news groups with commas.</i>
</font>
<%
'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 "<center><br><font color=blue> The previous article was successfully posted.</font></center>"
	'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	
%>
<form action="PostArticle_Process.asp" name="frmSendMail" method="post">
<div align="center">
  <center>
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#C0C0C0">
  <tr>
    <td bgcolor="#C0C0C0" colspan="2" nowrap>
    <img border="0" src="images/newsgroupdemo.gif" WIDTH="369" HEIGHT="28">
    </td>
  </tr>
  </center>
  <tr>
    <td bgcolor="#C0C0C0" nowrap>
      <p align="left"><b>News group server:&nbsp;</b></p>
    </td>
    <td bgcolor="#C0C0C0" nowrap> <input name="txtServer" size="41" tabindex="1" value="<%=temp(0)%>">&nbsp;
		<font color="red">*</font>
	</td>
  </tr>
  <center>
  <tr>
	<td bgcolor="#C0C0C0" nowrap>
		<b>News group(s) to post to:&nbsp;</b>
	</td>
    <td bgcolor="#C0C0C0" nowrap> <input name="txtNewsGroups" size="41" tabindex="2" value="<%=temp(1)%>">&nbsp;
		<font color="red">*</font>
    </td>
  </tr>
  <tr>
	<td bgcolor="#C0C0C0" nowrap>
		<b>ID of article to reply to (<i>optional</i>):&nbsp;</b>
	</td>
    <td bgcolor="#C0C0C0" nowrap> 
		<input name="txtID" size="41" tabindex="3" value="<%=temp(2)%>">
	</td>
  </tr>
  <tr>
	<td bgcolor="#C0C0C0" nowrap>
		<b>Your email address:&nbsp;</b>  
	</td>
    <td bgcolor="#C0C0C0" nowrap> 
		<input name="txtEmail" size="41" tabindex="4" value="<%=temp(3)%>">&nbsp;
		<font color="red">*</font>
    </td>
  </tr>
  <tr>
	<td bgcolor="#C0C0C0" nowrap>
		<b>Subject:&nbsp;</b>
	</td>
    <td bgcolor="#C0C0C0" nowrap> <input name="txtSubject" size="41" tabindex="5" value="<%=temp(4)%>">&nbsp;
		<font color="red">*</font>
    </td>
  </tr>
  <tr>
    <td bgcolor="#C0C0C0" colspan="2" nowrap>
		<br><p align="center"> 
		<textarea cols="105" name="txtArticle" rows="3" style="height: 150; width: 538" tabindex="6"></textarea></p>
    </td>
  </tr>
</table>
 </center>
</div>
<p align="center"><input type="submit" value="Post" name="cmdSubmit">
<input type="reset" value="Reset" name="cmdReset"></p>
</form>
<p><img border="0" src="images/scenario.gif" align="absmiddle" WIDTH="82" HEIGHT="14">
</p>
<font size="2"><p>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.
<p><img border="0" src="images/features.gif" WIDTH="81" HEIGHT="14">
<ul>
<li>Uses the <font color="blue">PostArticle</font> method of the Mailer control to post the article. 
<li>Enter the ID of an article you want to reply to so that your article appears beneath the article you are interested in.
</ul></font>
</body>
</html>