Olá, há uma semana estou tentando fazer um formulário para contato do usuário da minha página e não estou conseguindo. Por favor me ajudem!! Estou postando os códigos html e asp e o erro que está dando. html <form method="post" action="cdosys.asp">
Email address: <input type="text" name="email_address" /><br />
Question 1: <input type="text" name="question_1" /><br />
Question 2: <input type="text" name="question_2" /><br />
Question 3: <input type="text" name="question_3" /><br />
<input name="email_subject" type="hidden" value="Subject of
email" />
<input name="redirect_to" type="hidden"
value="redirect_to.htm" />
<input type="reset" name="Reset" value="Reset" />
<input name="send" type="submit" value="Submit" />
</form>
asp
<%
For Field = 1 to Request.Form.Count - 3
FieldName = Replace(Request.Form.Key(Field),"_"," ")
FieldValue = Request.Form.Item(Field)
Body = Body & FieldName & ": " & FieldValue & VbCrLf
Next
'Dimension variables
Dim objCDOSYSCon
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Set and update fields properties
With objCDOSYSCon
'Outgoing SMTP server
.Fields
("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "smtp.personalmoveisplanejados.com.br"
.Fields
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
'CDO Port
.Fields
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Timeout
.Fields
("http://schemas.microsoft.com/cdo/configuration/smtpconnectionti
meout") = 30
.Fields.Update
End With
'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
'Set and update email properties
With objCDOSYSMail'0=Low, 1=Normal, 2=High
.Fields("urn:schemas:httpmail:importance").Value = 1
'Who the e-mail is from
.From = Request.Form("email_address")
'Who the e-mail is sent to
.To = "contato@personalmoveisplanejados.com.br"
'Who the e-mail is CC'd to
.Cc = ""'The subject of the e-mail
.Subject = Request.Form("email_subject")
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
.TextBody = Body
.Fields.Update
'Send the e-mail
.Send
End With
'Close the server mail object
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
'Rederect after sending email
Response.Redirect Request.Form("redirect_to")
%>
erro
Microsoft VBScript compilation error '800a0400'
Expected statement
/cdosys.asp, line 16
("http://schemas.microsoft.com/cdo/configuration/smtpserver")
^ Na linha 16 já mudei para smtpuser.igempresas.ig.com.br------ smtp.igempresas.ig.com.br----- localhost e nada deu certo Desde já agradeço quem puder me ajudar. Obrigado Francisco