Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/07/2007, 07:53
mactintosh
 
Fecha de Ingreso: mayo-2007
Mensajes: 73
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Problemas con un formulario

hola....

yo tengo un problema parecido.....

compre una plantilla para hacerma la web de mi empresa....adjunto...me enviaron 2 archivos ke tengo ke subir al servidor junto a la web....

1- contact.asp
2- contact.php

la web esta exa entera en flash....pero para visualizarla meti la pelicila .swf dentro de un html

lleva 3 formularios y en uno de ellos lleva escrito esto.....


on (rollOver) {
this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
this.gotoAndPlay("s2");
}



on (release) {
for (i=1; i<_parent.fields_descriptions.length; i++) {
if (_parent[_parent.fields_descriptions[i][1]]!=undefined) {
this[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions[i][1]]+"&777&"+_parent.fields_descriptions[i][2];
}

}

this.recipient=_parent.rec;
i=undefined;
getURL("contact."+_parent.serv, "_blank", "POST");

}



ESTE ES EL CODIGO DEL ARCHIVO ADJUNTO contact.asp :

<%
for i=1 to 7
message=Request("message")
next
message=message + Request("message")
smtpServer = "enter your SMTP SERVER HERE"
smtpPort = 25


name = Request("Your_Name:")
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "from " & name
myMail.From = Request("Your_Email:")
myMail.To = Request("recipient")
myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & message & "</body></html>"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = smtpPort
myMail.Configuration.Fields.Update
myMail.Send

%>



ESTE ES EL CODIGO DEL ARCHIVO ADJUNTO contact.php :

<%
for i=1 to 7
message=Request("message")
next
message=message + Request("message")
smtpServer = "enter your SMTP SERVER HERE"
smtpPort = 25


name = Request("Your_Name:")
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "from " & name
myMail.From = Request("Your_Email:")
myMail.To = Request("recipient")
myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & message & "</body></html>"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = smtpPort
myMail.Configuration.Fields.Update
myMail.Send

%>





este es el codigo del archivo CONTACT.PHP (PHP script)


<?
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);
$post_vars[key($_REQUEST)][0]=$pre_array[0];
$post_vars[key($_REQUEST)][1]=$pre_array[1];
}
next($_REQUEST);
}



reset($post_vars);
$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
}
next($post_vars);
}

mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>






COMO TENGO KE MODIFICARLOS PARA KE FUNCIONE ???

cuando se envia el formulario desde la pelicula .swf se abre una ventana diciendo ke el mensaje se ha enviado correctamente...
pero no llega nada al correo electronico


en uno de los archivos en el cogido...dice escribir smtpserver & smtpport

pero no se ke es eso....imagino ke el servidor y el puerto del servidor donde esta mi web...pero en la web donde tengo contratado el dominio y el hosting no me dice ningun datos de eso.....solo me salen las dns....

me podeis exar una mano a ver si me podeis aunke solo sea orientar ????
agradeceria vuestra ayuda ya ke los formularios son para mis clientes.

gracias