Ho trovato su un sito un form mail il cui codice riporto per intero. Non essendo un esperto vorrei sapere cosa sbaglio, perchè messo tutto sul mio sito non funziona l'invio.

<%
Dim Oggetto, Messaggio, HostSmtp, Mittente, Destinatario
' Variabile da configurare!
HostSmtp = "www.profmaselli.it"

errore = False
nome = Trim(Request.Form("nome"))
cognome = Trim(Request.Form("cognome"))
email = Trim(Request.Form("email"))
commenti = Trim(Request.Form("commenti"))
destinatario = "informazioni@profmaselli.it"

' controlliamo i campi obbligatori...
If Len(nome) = 0 Then
errore = True
Response.Write "Il nome è obbligatorio!
"
End If

If Len(cognome) = 0 Then
errore = True
Response.Write "Il cognome è obbligatorio!
"
End If

If Len(email) = 0 Then
email="gig.mas@tin.it"
'Response.Write "L'email è obbligatoria!
"
End If

If Len(commenti) = 0 Then
errore = True
Response.Write "Il commento è obbligatorio!
"
End If
' fine controllo campi obbligatoriOggetto = Request.Form("oggetto")

Dim iMsg, iConf, Flds

'Crea l'oggetto email
Set iMsg = CreateObject("CDO.Message")

'Crea l'oggetto configurazione
Set iConf = CreateObject("CDO.Configuration")
'Impostazione delle configurazioni per l'invio remoto
Set Flds = iConf.Fields
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' porta 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = HostSmtp
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With


With iMsg
.From = nome & cognome
.To = destinatario
.Subject = "commenti al sito"
.TextBody = commenti 'Formato testo
.Send() 'Invia l'email
end with

set Flds = Nothing
set iConf = Nothing
set iMsg = Nothing

Response.Redirect "rispostaalcommento.html"
End If
%>