Here is the ASP code place in your CGI-Bin directory

We call the application CCIPRMail.asp

We pass several variable from the form to create the message.  You can
change it however you want just redirect the variables.  Should work great.

The redirect is only for Subscribe and Unsubscribe.  This way the user see
an HTML form confirmation of the request.

Instead of redirect to IMail (if that is not what you want to do) just send
it to the user if you desire.   We check the length of the variable since we
are passing "subscribe" or "unsubscribe"

The code for the form is from Front Page it is included at the bottom of
this script.  It is an htm page.  In Front Page you post to this CGI script.



<%@ LANGUAGE="VBSCRIPT" %>
<%
        Response.Buffer = True
%>
<html>

<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
<meta HTTP-EQUIV="Content-Type" content="text/html;charset=iso-8859-1">
<title>CDONTSMail</title>
<%
Set objFM = CreateObject("Scripting.Dictionary")

%>
<%
 Sub Write(strWriteThis)
 'This subroutine just writes out whatever is 'passed to it.
 response.write(strWriteThis & "<br>")
 end sub
 %>
</head>

<body>
<%
        Dim Temp
        DIM strWho
        Dim strFName
        Dim strOrg
        Dim strReq
        Dim strKit

        strReq = Request.Form("SubUns")
        strFName = Request.Form("Contact_FullName")
        strNews = Request.Form("NewsType")
        strWho = Request.Form("Contact_Email")
        strOrg = Request.Form("Contact_Organization")
        strKit = Request.Form("PressKit")


        If Len(strWho) > 5  Then
                Set Mail = Server.CreateObject("Persits.MailSender")
                Mail.Host = "ns1.citecomm.com"
                Mail.From = strWho
                Mail.FromName = "CCI Press Release"
                Mail.AddAddress "[EMAIL PROTECTED]"
                Mail.AddAddress "[EMAIL PROTECTED]"
                Mail.AddReplyTo strWho
                Mail.Subject = "Press Release"
                Mail.Body = (strReq + " "+ "Press" + " " + strFName + " " + strKit + " 
" +
strOrg + " " + strNews)
                On Error Resume Next
                Mail.Send
                If Err <> 0 Then
                Write "Letter was not sent " & Err.Des
                Else
                        Response.Clear
                        If Len(strReq) > 9 then
                        Response.Redirect "http://208.178.187.71/cancel.htm"
                        else
                                Response.Redirect "http://208.178.187.71/subscribe.htm"
                                End If
                        Response.End

                End If
        Else
                Write "Not a Valid Email Address"
        End If


%>
</body>
</html>


Font Page Stuff you may also view the form at
http://208.178.187.71/press.htm

If you are using Front Page develope the form and in Form Properties check
"Send To Other"
Then click on Options.  Here point to you cgi-bin directory and the file
name.

That's it.


<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META HTTP-EQUIV="Content-Language" CONTENT="en-us">
<TITLE>New Page 4</TITLE>
</HEAD>
<BODY bgcolor="#000033" text="#FFFFFF">
<H1>Press Releases</H1>
<HR>
<P>
You may subscribe or unsubscribe to our Press Releases. CCI reserves all
rights
regarding this service.</P>
<FORM METHOD="POST" ACTION="http://208.178.187.2/cgi-bin/CCIPRMail.asp"
onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<P>
Please provide the following contact information: Fields in <font
color="#FFFF00">Yellow</font>
are Not required</P>
<BLOCKQUOTE>
<TABLE>
<TR>
<TD ALIGN="right">
<EM>Name</EM></TD>
<TD>
<!--webbot bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="1"
I-Maximum-Length="75" -->
<INPUT NAME="Contact_FullName" SIZE=35 maxlength="75">
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>Organization</EM></TD>
<TD>
<!--webbot bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="1"
I-Maximum-Length="75" -->
<INPUT NAME="Contact_Organization" SIZE=35 maxlength="75">
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>Work Phone</EM></TD>
<TD>
<!--webbot bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="1"
I-Maximum-Length="25" -->
<INPUT TYPE=TEXT NAME="Contact_WorkPhone" SIZE=25 MAXLENGTH=25>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>E-mail</EM></TD>
<TD>
<!--webbot bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="1"
I-Maximum-Length="75" -->
<INPUT TYPE=TEXT NAME="Contact_Email" SIZE=25 maxlength="75">
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM><font color="#FFFF00">URL</font></EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_URL" SIZE=25 MAXLENGTH=25>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<P>
Would You Like A Press Kit</P>
<BLOCKQUOTE>
<P>
<SELECT NAME="PressKit" size="1">
<OPTION selected value="No">No
<OPTION value="Yes">Yes</SELECT>
<BR>
</P>
</BLOCKQUOTE>
<P>
Choose one of the following options:</P>
<BLOCKQUOTE>
<P>
<SELECT NAME="SubUns" size="1">
<OPTION SELECTED value="Subscribe">Subscribe
<OPTION value="Unsubscribe">Un-Subscribe</SELECT>
<BR>
</P>
</BLOCKQUOTE>
<INPUT TYPE=SUBMIT VALUE="Submit Form">
<INPUT TYPE=RESET VALUE="Reset Form">
</FORM>
<HR>
<H5><br>Copyright � 1999, 2000 CITE Communications International. All rights
reserved. <BR>
Revised: <!--WEBBOT bot=TimeStamp
    S-Type="EDITED"
    S-Format="%B %d, %Y"
--></H5>
</BODY>
</HTML>

Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

Reply via email to