Allora, ho questo file asp che prende i dati da un file contatti.html:
Il problema è che la mail mi arriva ma non mi include i dati raccolti dai form dell'altro file!!!!
codice:
<%@ Language="VBSCRIPT" CODEPAGE="1252" %>
<html>
<head>
<title>Message Sent</title>
</head>
<body>
<%
'declare the variables that will receive the values
'receive the values sent from the form and assign them to variables
'note that request.form("name") will receive the value entered into the textfield
'called name, and so with email and message
Dim surname, message,obj, NewMailObj
Dim name
'chkmail
Dim email
name=request.form("imObjectForm_1_1")
surname=request.form("imObjectForm_1_2")
email=Request.Form("email")
'chkmail=request.form("imObjectForm_1_3_chk")
obj=request.form("imObjectForm_1_4")
message=request.form("imObjectForm_1_5")
'create the mail object and send the details
Set NewMailObj=CreateObject("CDO.Message")
NewMailObj.From = "pincoapalla@gmail.com"
NewMailObj.To = "xxx@xxasd.it"
NewMailObj.Subject = "New message sent.." & obj
NewMailObj.HTMLBody = "the name entered is" & name & "
the email was " & email & "
the message is " & message
NewMailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
NewMailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.xxx.it"
'Server port
NewMailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
NewMailObj.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
NewMailObj.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
NewMailObj.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
NewMailObj.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxx@xx.it"
NewMailObj.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxx"
NewMailObj.Configuration.Fields.Update
'Close the email object and free up resources
NewMailObj.Send
Set NewMailObj = nothing
Response.write "The email was sent." & email & "mail"
%>
</body>
</html>