Hi everyone, im new to this site and also abit new to programming with asp. I have this form which is working fine, except for this little thing that I want and is not doing it. I want that when the user hit the Enviar btn (Submit) the info gets on the gracias.asp(thankyou.asp) and thats what Im not getting. Everything else is just fine, it send the info to my mail and everything, just that little detail.

Whats is wrong in the code??

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gracias por su interes</title>
<link href="Enfe.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	color: #A5B1DB;
	font-weight: bold;
	font-size: 24px;

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p><img src="images/index1_r1_c1.jpg" width="980" height="137" class="banner" /></p>
<p><span class="gracias">Gracias por el interés mostrado para continuar sus estudios profesionales con nuestra Escuela. Muy pronto uno de nuestros representantes, se estará cominicando con usted para brindarle más información.</span></p>
Const cdoSendUsingMethod        = _
Const cdoSendUsingPort          = 2
Const cdoSMTPServer             = _
Const cdoSMTPServerPort         = _
Const cdoSMTPConnectionTimeout  = _
Const cdoSMTPAuthenticate       = _
Const cdoBasic                  = 1
Const cdoSendUserName           = _
Const cdoSendPassword           = _

Dim objConfig  ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields     ' As ADODB.Fields
Dim Nombre, telefono, Email, Programa, Info

Nombre = Request.Form("Nombre")
telefono = Request.Form("telefono")
Email = Request.Form("Email")
Programa = Request.Form("Programa")
Info = Request.Form("Info")

' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields

' Set config fields we care about
With Fields
	.Item(cdoSendUsingMethod)       = cdoSendUsingPort
	.Item(cdoSMTPServer)            = "my SMTP"
	.Item(cdoSMTPServerPort)        = 25
	.Item(cdoSMTPConnectionTimeout) = 100
	.Item(cdoSMTPAuthenticate)      = cdoBasic
	.Item(cdoSendUserName)          = "my mail"	
	.Item(cdoSendPassword)          = "my password"

End With

Set objMessage = Server.CreateObject("CDO.Message")

Set objMessage.Configuration = objConfig

With objMessage
	.To       = "mymail"
	.From     = "my mail"
	.Subject  = "Informacion" 
	.TextBody = "Mensaje enviado @ " & Now()  & vbCrLf & "Nombre: " &
	Nombre & vbCrLf & "Teléfono : " & telefono & vbCrLf & "Correo: " & Email &
	vbCrLf & "Programa de Interés : " & Programa & vbCrLf & "Información adicional: " & 
End With

Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing

Any help would be appreciated. Thanx

Luis - From Puerto Rico

7 Years
Discussion Span
Last Post by Baradaran

just set the following line at the very end of your file:

<% Response.Redirect "gracias.asp" %>

Good luck.
Ali Baradaran

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.