Ciao a tutti,
premettendo che non ho mai programmato in asp ho dovuto realizzare una form con questo linguaggio.
Ovviamente ho preso il codice da uno script già fatto e riadattato alle mie esigenze ma...non funziona
Mi hanno detto che è perchè usa CDONT mentre dovrebbe usare CDOSYS.
Già ma come
Posto il codice da me usato nella speranza di qualche buon'anima.

bye
codice:
<%@ LANGUAGE="VBSCRIPT" %>
      <HTML>
      <HEAD>
      <META HTTP-EQUIV=
       "Content-Type"content="text/html; charset=iso-8859-1">
      <TITLE>Milanofitness - convention</TITLE>

      <%
      Sub Write(strWriteThis)
         response.write(strWriteThis)
      end sub

      %>

	  <link href="style.css" rel="stylesheet" type="text/css">
      </HEAD>
      
<body bgcolor="#FFFF99">
<%
         Dim mailer

         Dim strNome
         Dim strCognome
         Dim strIndirizzo
         Dim strCap
         Dim strCitta
         Dim strProvincia
         Dim strTelefono
         Dim strFax
		 Dim strEmail
         Dim strEta
         Dim strProfessione
         Dim strNote

         Dim strFrom
         Dim strTo
         Dim strSubject
         Dim strMessage
         Dim lngImportance
	 Dim intError
         Dim strError

         strNome=request.form("textfield")
         strCognome=request.form("textfield2")
         strIndirizzo=request.form("textfield3")
         strCap=request.form("textfield4")
         strCitta=request.form("textfield5")
         strProvincia=request.form("textfield6")
         strTelefono=request.form("textfield7")
         strFax=request.form("textfield8")
		 strEmail=request.form("textfield9")
         strEta=request.form("textfield10")
         strProfessione=request.form("textfield11")
         strNote=request.form("textfield12")

         intError=0
         if (strNome = "") then
             intError = 1
             strError = strError & "Manca il campo NOME.
"
         end if

         if (strCognome = "") then
             intError = 1
             strError = strError & "Manca il campo COGNOME.
"
         end if

         if (strIndirizzo = "") then
             intError = 1
             strError = strError & "Manca il campo INDIRIZZO.
"
         end if

         if (strCap = "") then
             intError = 1
             strError = strError & "Manca il campo CAP.
"
         end if

         if (strCitta = "") then
             intError = 1
             strError = strError & "Manca il campo CITTA'.
"
         end if
		 
		 if (strProvincia = "") then
             intError = 1
             strError = strError & "Manca il campo PROVINCIA.
"
         end if
		 
		 if (strTelefono = "") then
             intError = 1
             strError = strError & "Manca il campo TELEFONO.
"
         end if
		 
		 if (strEmail = "") then
             intError = 1
             strError = strError & "Manca il campo E-MAIL'.
"
         end if

         if (intError = 0) then
             strFrom=strEmail
             strTo="fabio.gualazzi@fastpiu.it"
             strSubject="Iscrizione Convention"

strBody="<html><body>E stata ricevuta la richiesta d iscrizione da parte di:

<table border=0><tr><td>Nome: <td>" & strNome & "</td></tr><tr><td>Cognome:  <td>" & strCognome & "</td></tr><tr><td>Indirizzo: <td>" & strIndirizzo & "</td></tr><tr><td>Cap: <td>" & strCap & "</td></tr><tr><td>Città: <td>" & strCitta & "</td></tr><tr><td>Provincia: <td>" & strProvincia & "</td></tr><tr><td>Telefono: <td>" & strTelefono & "</td></tr><tr><td>Fax: <td>" & strFax & "</td></tr><tr><td>E-Mail: <td>" & strEmail & "</td></tr><tr><td>Età: <td>" & strEta & "</td></tr><tr><td>Professione: <td>" & strProfessione & "</td></tr><tr><td>Note varie: <td>" & strNote & "</td></tr></table></body></html>"


            lngImportance=2

             Set mailer=CreateObject("CDONTS.NewMail")

	     mailer.BodyFormat=0 
	     mailer.MailFormat=0 
	     mailer.Send strFrom,strTo,strSubject,strBody,lngImportance

             Set mailer=Nothing

             Write ("


La Vostra richiesta d'iscrizione e' stata ricevuta.

Verrete contattati al piu' presto.





<a href=javascript:window.close()>chiudi la finestra</a></font>[/b]</font>")
         else 
             Write ("


" & strError & "</font>[/b]</font>
<form><input type=button value='Indietro' language='VBScript' onClick='call window.history.back(1)'></form>")
         end if
         %>
</BODY>
      </HTML>