This takes two forms fields; email and name from the following form:
<form method="POST" action="acaspmail.asp">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" valign="middle" align="center" colspan="2">
<h1 align="center">State of Connecticut Web Site Accessibility
Listserv (access-ct)</h1>
<h2 align="center">Subscription Request Form</h2>
<p align="center">Please enter your name and your e-mail address
and
press the Submit Button</p>
<p align="center"> </p>
</td>
</tr>
<tr>
<td width="25%" valign="middle" align="right"><label
for="name">Name: </label></td>
<td width="75%" valign="middle" align="left"><input type="text"
id="name" name="name" size="42"></td>
</tr>
<tr>
<td width="25%" valign="middle" align="right"><label
for="email">Email: </label></td>
<td width="75%" valign="middle" align="left"><input type="text"
id="email" name="email" size="42"></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" colspan="2"><input
type="submit" value="Submit" name="B1"></td>
</form>
and generates the subscribe email and sends it to the listserv processor. It
then passes off (via the #include at the bottom to a thank you page.
<%
Dim MyBody
Dim MyASPMail
%>
<%
Set MyASPMail = CreateObject("SMTPsvg.Mailer")
MyASPMail.QMessage = TRUE
MyASPMail.FromAddress= Request("email")
MyASPMail.AddRecipient "Your list serv name", "your list serv address"
MyASPMail.RemoteHost="your amtp mail server name goes here"
MyASPMail.Subject="Subscription Request"
MyBody = MyBody & "subscribe access-ct " & Request("name") & vbCrLf
MyASPMail.BodyText= MyBody
MyASPMail.SendMail
set MyASPMail=nothing
%>
<!--#include file="acthanks.htm"-->
--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web:
http://www.spiderwebwoman.com/resources/
blog:
http://msmvps.com/spiderwebwoman/category/321.aspx