Emailing Form entries

Hi Andy.This is the chunk of code I got from Tekprof:I saved it as an asp file, but when I publish and actually use the pade, I get an I/O error. <%@ Language=VBScript %> <% ' the variable names on the right in the quotes correspond to the variable names you created in Lectora ' the variable names on the left do not have to agree with the names on the right but it is a good convention q1=request.form("q1") q2=request.form("q2") q3=request.form("q3") q4=request.form("q4") q5=request.form("q5") ' The variable name below outside of the quotes must agree with the variable name on the left above strBody="" strBody=strBody & "q1: " & q1 & vbCrLf strBody=strBody & "q2: " & q2 & vbCrLf strBody=strBody & "q3: " & q3 & vbCrLf strBody=strBody & "q4: " & q4 & vbCrLf strBody=strBody & "q5: " & q5 & vbCrLf ' Now to send the email Dim objCDO ' use the line below for IIS5 delete the line if using IIS6 Set objCDO = Server.CreateObject("CDONTS.NewMail") ' use the line below for IIS6 delete the line if using IIS5 Set objCDO = Server.CreateObject("CDO.Message") ' put in whatever you want for the subject line objCDO.subject="substitute your subject here" ' put your email address in the line below objCDO.From="my.address@email.com" ' put your email address in the line below objCDO.To="my.address@email.com" ' use objCDO.Body for IIS5 delete the line if using IIS6 objCDO.Body = strBody ' use objCDO.TextBody for IIS6 delete the line if using IIS5 objCDO.TextBody = strBody objCDO.Send Set objCDO = Nothing %>

Discussions have been disabled for this post