<form name="form1" method="post" action="emailinviata.asp"">
COGNOME
<label>
<input type="text" name="textfield">
</label>
NOME
<label>
<input type="text" name="textfield2">
</label>
RECAPITO
<label>
<input type="text" name="textfield3">
</label>
DATIXCONSEGNA
<label>
<textarea name="textarea"></textarea>
</label>
<label>
<input type="submit" name="Submit" value="RICHIEDI" />
</label>
</form>
Pagina asp:
<%
// Recupero i dati dal modulo
var cognome = new String(Request.Form("cognome"));
var nome = new String(Request.Form("nome"));
var recapito = new String(Request.Form("recapito"));
var datixconsegna= textarea(Request.Form("datixconsegna"));
// Creo l'oggetto (o classe) CDONTS.NewMail
var OggettoCDONTS = new ActiveXObject("CDONTS.NewMail");
OggettoCDONTS.From = email; // Mittente
OggettoCDONTS.To = "alessio334@gmail.com"; // Destinatario (inserisci la tua email)
OggettoCDONTS.Subject = "Messaggio da " + nome; // Oggetto
OggettoCDONTS.Body = cognome;nome;recapito;datixconsegna // Corpo
OggettoCDONTS.Send(); // Invio la mail
Response.Write("Grazie per aver richiesto il nostro servizio");
%>
Cosa c'è di sbagliato?

Rispondi quotando
