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??

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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">
<head>
<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;
}
-->
</style></head>

<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>
<p>
  <%
Const cdoSendUsingMethod        = _
	"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort          = 2
Const cdoSMTPServer             = _
	"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort         = _
	"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout  = _
	"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate       = _
	"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic                  = 1
Const cdoSendUserName           = _
	"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword           = _
	"http://schemas.microsoft.com/cdo/configuration/sendpassword"

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"

	.Update
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: " & 
	Info
	.Send
End With

Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>
</p>
</body>
</html>

Any help would be appreciated. Thanx

Luis - From Puerto Rico

Hi,
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.