Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDOSYS not working...sorry, I'm new to it... 1

Status
Not open for further replies.

CLMooreJr

Instructor
Feb 6, 2006
35
US
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
 
By the way, if it helps, here is the error it calls when the SUBMIT button is pressed...

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/classes_info.asp, line 5

800401f3


"The secret of teaching is to appear to have known all your life what you learned this afternoon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top