Sending Email from the Server using ASP.
Sending email through Active Server Pages is not a difficult task. All you need is the Collaborative Data Object, which ships with NT Option Pack 4. To make sure you have it installed, go to Start / Control Panel / Add/Remove Programs / NT Option Pack 4, and see if the SMTP Piece has been installed. If it is *not* installed, you will get an error when you try to run the code, shown below (the error will read something like, "Invalid class string"

.
eg:-
<%
MsgFrom = Request.Form("EmailTextBox"

MsgTo = "fred@flintstone.com;barny@flintstone.com"
MsgSubject = "Happy Christmas"
MsgMessage = "Hi there Fred/Barny..." & vbcrlf _
& "Give me regards to the Betty/Wilma."
MsgImportance = 0 'Low
Set objNewMail = CreateObject("CDONTS.NewMail"

objNewMail.Send MsgFrom,MsgTo,MsgSubject,MsgMessage,MsgImportance
%>
If you don't have CDONTS installed then you need to find out what email software your host provides.
The following example uses ASPMail:-
<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"
mailserver = "mail.wiredhosting.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 %>