ciao ragazzi ho questo codice:
mi spiegate come va settato:
mettiamo conto che la mia email è ciccio@yahoo.it
<%
'Dimension variables
Dim strFrom, strFromMail, strBody
From = Request.Form("nome")
Fromname =Request.Form("nome")
FromMail = Request.Form("email")
nome = Request.Form("nome")
cognome = Request.Form("nome")
codice_fiscale = Request.Form("codfisc")
cap = Request.Form("cap")
indirizzo = Request.Form("indirizzo")
provincia = Request.Form("prov")
citta = Request.Form("citta")
attiva = Request.Form("attiva")
attiva1 = Request.Form("attiva1")
attiva2 = Request.Form("attiva2")
isdn = Request.Form("isdn")
isdn1 = Request.Form("isdn1")
isdn2 = Request.Form("isdn2")
rid = Request.Form("rid")
abi = Request.Form("abi")
cab = Request.Form("cab")
cc = Request.Form("cc")
codice_fisc_correntista = Request.Form("codfisccorrent")
bollettino_postale = Request.Form("bolpost")
'Error handler
On error resume next
'Initialse strBody string with the body of the e-mail
strBody = strBody & vbCrLf & "Cognome e nome (o rag. soc.): " & Request.Form("nome") & vbCrLf
strBody = strBody & vbCrLf & "Residenza: " & vbCrLf
If (Request.Form("indirizzo")) > "" Then
strBody = strBody & " " & Request.Form("indirizzo") & vbCrLf
End If
If (Request.Form("cap")) > "" Then
strBody = strBody & " " & Request.Form("cap") & vbCrLf
End If
If (Request.Form("citta")) > "" Then
strBody = strBody & " " & Request.Form("citta") & vbCrLf
End If
If (Request.Form("prov")) > "" Then
strBody = strBody & " " & Request.Form("prov") & vbCrLf
End If
If (Request.Form("email")) > "" Then
strBody = strBody & " " & Request.Form("email") & vbCrLf
End If
strBody = strBody & vbCrLf & "Cod.Fiscale (o P.IVA): " & Request.Form("codfisc") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Attivazione tradizionale: " & Request.Form("attiva") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Linea 1: " & Request.Form("attiva1") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Linea 2: " & Request.Form("attiva2") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Attivazione ISDN: " & Request.Form("isdn") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "linea 1: " & Request.Form("isdn1") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Linea 2: " & Request.Form("isdn2") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Mod. pagamento RID: " & Request.Form("rid") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "ABI: " & Request.Form("abi") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "CAB: " & Request.Form("cab") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "C/C: " & Request.Form("cc") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Codice fiscale correntista: " & Request.Form("codfisccorrent") & vbCrLf & vbCrLf
strBody = strBody & vbCrLf & "Bollettino postale: " & Request.Form("bolpost") & vbCrLf & vbCrLf
'Create the e-mail server object
Set objASPEMail = Server.CreateObject("Persits.MailSender")
objASPEMail.Host = "mail.?????.it"
'Send the e-mail
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objASPEMail.From = Request.Form("email")
'Who the e-mail is sent to
objASPEMail.AddAddress "???@???.it"
'The subject of the e-mail
objASPEMail.Subject = "Sottoscrizione abbonamento"
'The main body of the e-mail
objASPEMail.Body = strBody
'CONTROLLIAMO SE TUTTO E' AVVENUTO CON SUCCESSO
On Error Resume Next
objASPEMail.Send()
If Err <> 0 Then
Response.Write "
Si è verificato questo errore: " & Err.Description
Else
Response.Redirect "risposta.asp"
End If
Set objASPEMail = Nothing
%>![]()

Rispondi quotando
,
