Asp, mail, check it, i don't understand it very good

hello,

this script i found on internet, but i don’t understand it very well, can somebody help me please?

dim oCdonts, intDHash, intHash, strReferer, strServer, strClientIP, strServerIP, blnSpam

set oCdonts = server.createobject(“CDONTS.Newmail”)

strReferer = request.servervariables(“HTTP_REFERER”)
strServer = Replace(request.servervariables(“SERVER_NAME”), “www.”, “”)
strClientIP = request.servervariables(“REMOTE_ADDR”)
strServerIP = request.servervariables(“LOCAL_ADDR”)
strFrom = “noreply@” & strServer

intComp = inStr(strReferer, strServer)
If intComp > 0 Then
blnSpam = False
Else
’ Spam Attempt Block
blnSpam = True
End If

oCdonts.to = request.form(“email”)
oCdonts.from = strFrom
oCdonts.Subject = “CDONTS Test Mail”
oCdonts.body = “This test mail has been sent from server "
oCdonts.body = oCdonts.body & request.servervariables(“LOCAL_ADDR”) & " via CDONTS mail objects.”

If NOT blnSpam Then
oCdonts.send
strResult = “Mail Sent.”
Else
strResult = “Mail Not Sent.”
End If

set oCdonts=nothing

I’m not sure what it is that you don’t understand, so I’ve added comments to the code to explain what each section does.

’ define the variables to be used

dim oCdonts, intDHash, intHash, strReferer, strServer, strClientIP, strServerIP, blnSpam

’ open CDO mail object

set oCdonts = server.createobject(“CDONTS.Newmail”)

’ retrieve user info from HTTP header

strReferer = request.servervariables(“HTTP_REFERER”)
strServer = Replace(request.servervariables(“SERVER_NAME”), “www.”, “”)
strClientIP = request.servervariables(“REMOTE_ADDR”)
strServerIP = request.servervariables(“LOCAL_ADDR”)

’ set “FROM” variable based on retreived data

strFrom = “noreply@” & strServer

’ look for server name within refering page URL
’ If they match then not spam, else it is spam

intComp = inStr(strReferer, strServer)
If intComp > 0 Then
blnSpam = False
Else
’ Spam Attempt Block
blnSpam = True
End If

'assign values to CDO mail parameters

oCdonts.to = request.form(“email”)
oCdonts.from = strFrom
oCdonts.Subject = “CDONTS Test Mail”
oCdonts.body = “This test mail has been sent from server "
oCdonts.body = oCdonts.body & request.servervariables(“LOCAL_ADDR”) & " via CDONTS mail objects.”

’ if NOT spam then send the mail

If NOT blnSpam Then
oCdonts.send
strResult = “Mail Sent.”
Else
strResult = “Mail Not Sent.”
End If

’ close CDO mail object

set oCdonts=nothing

thank you,

but i have put some things out of the code, because it didn’t work. But it still doesn’t work. here is the code

dim oCdonts, intDHash, intHash, strReferer, strServer, strClientIP, strServerIP, blnSpam
set oCdonts = server.createobject(“CDONTS.Newmail”)

’ Vul in de plaats van de tekst tussen < en > uw eigen email adres in…
strFrom = "virusdoder@hotmail.com"

’ haal het TO email adres op uit het formulier (hier noemt het tekstveld in het formulier “email”
oCdonts.to = request.form(“mailadres”)
oCdonts.from = strFrom
oCdonts.Subject = “Bedankt voor het sturen van een mail”
oCdonts.body = “test”
oCdonts.body = oCdonts.body

oCdonts.send

set oCdonts=nothing

error: he didn’t find the class of cdonts.
i’m working with een nt workstation and i have a firewall.

hope you can help me