Simple asp form

SaaM

New Member
Trying to get a very simple classic asp form up and running on 123-reg. 123-reg provide a script to get this done but I have no idea how this script connects to the form I've made.Here's my html:\[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Untitled Document</title></head><body><form id="form" target="_blank" action="script.asp" method="post">Name: <input name="Name" type="text" /><br />Customer ID: <input name="Customer ID" type="text" /><br />Email Address: <input name="Email" type="text" /><br />Comments:<br /><textarea name="Comments" rows=5 cols=50></textarea><input type="submit" value="http://stackoverflow.com/questions/11710205/Submit" /><input type="reset" value="http://stackoverflow.com/questions/11710205/Clear" /></form></body></html>\[/code\]And this is the simple script:\[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Secure Mail (ASP)</title></head><body><div id="container" class="index" style="padding:10px"><br /><br /><h2>Secure Mail (ASP)</h2><br /><%'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''To get the script for work please set the following values:'Set the credentials for your email account to send the email fromusername="MYUSERNAME" 'Insert your email account username between the double quotes password="MYPASSWORD" 'Insert your email account password between the double quotes 'Set the from and to email addressessendFrom = "[email protected]" 'Insert the email address you wish to send from sendTo = "MYEMAIL" 'Insert the email address to send to in here'DO NOT CHANGE ANY SCRIPT CODE BELOW THIS LINE.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''This script demonstrates how to send an email using asmtp'Create a CDO.Configuration objectSet objCdoCfg = Server.CreateObject("CDO.Configuration")'Configure the settings needed to send an emailobjCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="intmail.atlas.pipex.net"objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = usernameobjCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = passwordobjCdoCfg.Fields.Update'Create the email that we are going to sendSet objCdoMessage = Server.CreateObject("CDO.Message")Set objCdoMessage.Configuration = objCdoCfgobjCdoMessage.From = sendFromobjCdoMessage.To = sendToobjCdoMessage.Subject = "This is a test email."'Add the email body textobjCdoMessage.TextBody = "Email sent using ASMTP from a ASP script."On Error Resume Next'Send the emailobjCdoMessage.Send'Check if an exception was thrown If Err.Number <> 0 Then 'Response.Write "<FONT color=""Red"">Error: " & Err.Description & " (" & Err.Number & ")</FONT><br/>"Else Response.Write "<FONT color=""Green"">The email has been sent to " & sendTo & ".</FONT>"End If'Dispose of the objects after we have used themSet objCdoMessage = NothingSet objCdoCfg = NothingSet FSO = nothingSet TextStream = Nothing%></div></body> </html>\[/code\]I know the script works as it sends the email, however none of the information included in the HTML form seems to be included.Don't usually work with forms so any advice would be gratefully received. Thanks,Dan
 
Back
Top