Hey all...I'm new to this but am trying to create a form that e-mails me the results. The tutorial I went through told me to use CDONTS, but I see now that that is no longer supported and to use CDOSYS. However I still get an error message on line number 5 of my script. I'm going to paste my script in and if someone could help me I would greatly appreciate it!!!
<% @language="VBSCRIPT" %>
<%
Dim myMail, myBody
myBody ="Name: "& request.form("name") & vbcrlf & "Company: " & request.form("company") & vbcrlf & "E-Mail: "& vbcrlf & request.form ("email") & vbcrlf & "MS Word: "& vbcrlf & request.form ("msword") & vbcrlf & "MS Access: "& vbcrlf & request.form ("msaccess") & vbcrlf & "MS Powerpoint: "& vbcrlf & request.form ("mspowerpoint") & vbcrlf & "MS Excel: "& vbcrlf & request.form ("msexcel") & vbcrlf & "msfrontpage: "& vbcrlf & request.form ("msfrontpage")
-----The following line is causing the errors------
Set myMail = Server.CreateObject ("CDO.NewMail")
-----Error Line above-----------------------------
myMail.From = request.form("email")
myMail.To = "Myemailaddress.com"
myMail.Subject = "Class Information"
myMail.Body = myBody
myMail.Send
set myMail=nothing
Response.Redirect("classes_thanks.asp")
%>
I've even tried changing CDO.Newmail to CDOSYS.Newmail but still an error...sorry, I'm not a programmer, so I'm kinda lost on this. However my Web provider says they DO support CDOSYS, so it must be an error in the script...
Later when this works, I need a drop down box with a few peoples name in it, say John Smith, Mary Jones, etc, and they get COPIED on the e-mail...any suggestions on how to do this??
Thanks again everyone!
Any help would be greatly appreciataed...!!!
"The secret of teaching is to appear to have known all your life what you learned this afternoon
<% @language="VBSCRIPT" %>
<%
Dim myMail, myBody
myBody ="Name: "& request.form("name") & vbcrlf & "Company: " & request.form("company") & vbcrlf & "E-Mail: "& vbcrlf & request.form ("email") & vbcrlf & "MS Word: "& vbcrlf & request.form ("msword") & vbcrlf & "MS Access: "& vbcrlf & request.form ("msaccess") & vbcrlf & "MS Powerpoint: "& vbcrlf & request.form ("mspowerpoint") & vbcrlf & "MS Excel: "& vbcrlf & request.form ("msexcel") & vbcrlf & "msfrontpage: "& vbcrlf & request.form ("msfrontpage")
-----The following line is causing the errors------
Set myMail = Server.CreateObject ("CDO.NewMail")
-----Error Line above-----------------------------
myMail.From = request.form("email")
myMail.To = "Myemailaddress.com"
myMail.Subject = "Class Information"
myMail.Body = myBody
myMail.Send
set myMail=nothing
Response.Redirect("classes_thanks.asp")
%>
I've even tried changing CDO.Newmail to CDOSYS.Newmail but still an error...sorry, I'm not a programmer, so I'm kinda lost on this. However my Web provider says they DO support CDOSYS, so it must be an error in the script...
Later when this works, I need a drop down box with a few peoples name in it, say John Smith, Mary Jones, etc, and they get COPIED on the e-mail...any suggestions on how to do this??
Thanks again everyone!
Any help would be greatly appreciataed...!!!
"The secret of teaching is to appear to have known all your life what you learned this afternoon