Flicks Software's OCXMail ASP Component
Form to email example

Create a file called formToEmail.htm with the following contents:

<FORM METHOD="POST" ACTION="formToEmail.asp">
<PRE>
Message Recipient: <INPUT SIZE=30 NAME="recipient" MAXLENGTH=200>
<P>
Message Sender: <INPUT SIZE=30 NAME="sender" MAXLENGTH=200>
<P>
Subject: <INPUT SIZE=30 NAME="subject" MAXLENGTH=512>
<P>
First Line Of Message: <TEXTAREA ROWS=2 COLS=60 NAME="messageline1"> </TEXTAREA>
<P>
Second Line Of Message: <TEXTAREA ROWS=2 COLS=60 NAME="messageline2"> </TEXTAREA>
</PRE>
<INPUT TYPE=submit VALUE=" Send ">

then create the ASP file formToEmail.asp to receive the form, and send the email:

<%
Set mailer = Server.CreateObject("ASPMAIL.ASPMailCtrl.1")
recipient = Request.Form("recipient")
sender = Request.Form("sender")
subject = Request.Form("subject")
message = Request.Form("messageline1")
message = message & vbCRLF
message = message & vbCRLF
message = message & Request.Form("messageline2")
' insert your mail server here
mailserver = "your.mailserver.com"
result = mailer.SendMail(mailserver, recipient, sender, subject, message)
%>
<% If "" = result Then %>
Mail has been sent.
<% Else %>
Mail was not sent, error message is
<H2>
<%= result %>
</H2>
<% End If %>

Applies To

OCXMail ASP Component

 

 

 

 

http://www.flicks.com/authentix/discover/main.htm