I used the code below and i had this error : Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/changerequp/changerequestfn.asp, line 83
and this is line 83 : Set objMail = Server.CreateObject("CDONTS.NewMail")
please help me and i also want to be able to display the following data on a page with the most recent on top, and also send the link of the most recently filled form to the e-mail address below and also send the form details to the e-mail address below , thank you.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim orset
dim stremailaddress
dim strRequestorName
set cnn = server.CreateObject("ADODB.connection")
cnn.open "provider=microsoft.jet.OLEDB.4.0;data source =" & server.mappath("db\ChangeRequest.mdb")
set orset = server.CreateObject("ADODB.recordset")
strSQL = "SELECT * FROM configurationchange;"
'Open the recordset with the SQL query
orset.Open strSQL, Cnn ,3,3
orset.AddNew
oRset("Descofchange") = request.form("Descofchange")
oRset("date") = request.form("date")
oRset("Nameofrequestor") = request.form("Nameofrequestor")
oRset("LocationofChange") = request.form("LocationofChange")
oRset("ApprovedGM") = request.form("ApprovedGM")
oRset("ApprovedCTO") = request.form("ApprovedCTO")
oRset("emailaddress") = request.form("emailaddress")
oRset("stafftoConfigChange") = request.form("stafftoConfigChange")
oRset("stafftopassInfo") = request.form("stafftopassInfo")
oRset("dateforChange") = request.form("dateforChange")
oRset("Starttime") = request.form("Starttime")
oRset("Downtime") = request.form("Downtime")
oRset("endtime") = request.form("endtime")
oRset("Emailaddress") = request.form("Emailaddress")
oRset("RiskInvolved") = request.form("RiskInvolved")
oRset("Impactoncustomers") = request.form("Impactoncustomers")
oRset("CustomersAffected") = request.form("CustomersAffected")
oRset("Reactive") = request.form("Reactive")
oRset("ToCorrect") = request.form("ToCorrect")
oRset("ToIncrease") = request.form("ToIncrease")
oRset("Maintenance") = request.form("Maintenance")
oRset("Hub") = request.form("Hub")
oRset("ITNetwork") = request.form("ITNetwork")
oRset("RFT") = request.form("RFT")
oRset("TelSystem") = request.form("TelSystem")
oRset("Other") = request.form("Other")
oRset("Reason") = request.form("Reason")
oRset("Approach") = request.form("Approach")
oRset("FallbackProcedure") = request.form("FallbackProcedure")
oRset("DocforUpdate") = request.form("DocforUpdate")
oRset("Refdocument") = request.form("Refdocument")
oRset("ChangeImpact") = request.form("ChangeImpact")
'orset("firstname") = Request.Form("firstname")
'orset.Fields("surname") = Request.Form("surname")
'orset.Fields("box1") = Request.Form("box1")
'orset.Fields("box2") = Request.Form("box2")
Call SendRequestMail()
orset.Update
stremailaddress = request.Form("emailaddress")
strRequestorName = request.form("nameofrequestor")
strDescofchange = request.form("descofchange")
Sub SendRequestMail()
strCrLf = Chr(13) & Chr(10)
strSender = emailaddress
strRecipient = "
[email protected]"
strSubject = "Your REQUEST HAS BEEN APPROVED"
strBody = "Dear " & strRequestorName & "," & strCrLf & strCrLf
strBody = strBody & strDescofchange & strCrLf & strCrLf
strBody = strBody & LocationofChange & strCrLf & strCrLf
strBody = strBody & strPersontoImplementConfigChange
strBody = strBody & strPersonresponsibletopassInformation
strBody = strBody & " " & strCrLf & strCrLf
strBody = strBody & "" & strCrLf & strCrLf
strBody = strBody & ""
strBody = strBody & "" & strCrLf & strCrLf
strBody = strBody & "." & strCrLf & strCrLf
'send email
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = strSender
objMail.To = strRecipient
objMail.Subject = strSubject
objMail.Body = strBody
objMail.Send
set objMail=nothing
End Sub
orset.Close
Set orset = Nothing
Set cnn = Nothing
Response.Redirect "ChangeRequest.asp"
%>