Foros del Web » Programando para Internet » PHP »

Problemas con Email Flash+PHP

Estas en el tema de Problemas con Email Flash+PHP en el foro de PHP en Foros del Web. Hola Chicos como andan? Queria pedirles ayuda para solucionar este problema que me esta quitando el sueño estos ultimos dias. Les cuento: Tengo un formulario ...
  #1 (permalink)  
Antiguo 30/04/2008, 06:16
 
Fecha de Ingreso: abril-2008
Ubicación: Mendoza, Argentina
Mensajes: 1
Antigüedad: 16 años
Puntos: 0
Problemas con Email Flash+PHP

Hola Chicos como andan?
Queria pedirles ayuda para solucionar este problema que me esta quitando el sueño estos ultimos dias. Les cuento:
Tengo un formulario en flash que envia un mail a traves de PHP, si se envia OK, le avisa el envio correcto a Flash y Flash reproduce el mensaje de envio ok y borra los campos que lleno el cliente.
Bien, cuando lo hago a nivel local anda barbaro, pero online el Swf donde esta el formulario, se carga dentro de otro swf, entonces me envia el mail, pero nunca me avisa el estado. Tengo esto en el PHP:

<?php
if(isset($_POST["Nombre"]) && isset($_POST["Responsable"]) && isset($_POST["Telefono"]) && isset($_POST["Mail"]) && isset($_POST["Asunto"]) && isset($_POST["Destino"]) && isset($_POST["Comentarios"])){
$day = date('d');
$month = date('m');
$year = date('Y');
$time = date ('H:i');
if($month == '01') $month_name = "ENERO";
if($month == '02') $month_name = "FEBRERO";
if($month == '03') $month_name = "MARZO";
if($month == '04') $month_name = "ABRIL";
if($month == '05') $month_name = "MAYO";
if($month == '06') $month_name = "JUNIO";
if($month == '07') $month_name = "JULIO";
if($month == '08') $month_name = "AGOSTO";
if($month == '09') $month_name = "SEPTIEMBRE";
if($month == '10') $month_name = "OCTUBRE";
if($month == '11') $month_name = "NOVIEMBRE";
if($month == '12') $month_name = "DICIEMBRE";
$fecha = "$day $month_name $year - $time hrs.";
$mymail = "[email protected]";
$subject = "Contacto desde www.hilerastours.com.ar";
$html = "
<table width='450' border='1' cellspacing='0' cellpadding='3' style='font-family:Arial; font-size: 8pt;' bordercolor='#999999'>
<tr bgcolor='#E0E513'>
<td colspan='2'><b>Información Personal</b></td>
</tr>
<tr>
<td width='129'><b>Nombre:</b></td>
<td width='305'>" .$_POST['Nombre'] . "</td>
</tr>
<tr>
<td width='129'><b>Responsable:</b></td>
<td width='305'>" .$_POST['Responsable'] . "</td>
</tr>
<tr>
<td width='129'><b>Telefono:</b></td>
<td width='305'>" .$_POST['Telefono'] . "</td>
</tr>
<tr>
<td width='129'><b>E-mail:</b></td>
<td width='305'>" .$_POST['Mail']. "</td>
</tr>
<tr>
<td width='129'><b>Actividad:</b></td>
<td width='305'>" .$_POST['Asunto']. "</td>
</tr>
<tr>
<td width='129'><b>Destino:</b></td>
<td width='305'>" .$_POST['Destino'] . "</td>
</tr>
<tr>
<td width='129'><b>Comentarios:</b></td>
<td width='305'>" .$_POST['Comentarios']. "</td>
</tr>
<tr>
<td width='129'><b>Fecha:</b></td>
<td width='305'>" .$fecha . "</td>
</tr>
<tr>
<td colspan='2' bgcolor='#E0E513'><div align='right'><b>www.hilerastours.com.ar</b></div></td>
</tr>
</table>
";
$htmlDos = "
<table width='450' border='0' cellspacing='0' cellpadding='0' style='font-family:Arial; font-size: 8pt;' bordercolor='#999999'>
<tr>
<td height='30' valign='top'><b><H3>Gracias por comunicarse con nosotros. En breve estaremos en contacto con Usted. Saludos cordiales.</H3></b></td>
</tr>
<tr>
<br><br>hilerastours® 2008<br><a style='text-decoration:none; background-color: #E0E513; color:#000000; font-family:Arial; font-size: 8pt;' href='http://www.hilerastours.com.ar' target='_blank'>www.hilerastours.com.ar</a></td>
</tr>
</table>";
$Mail = $_POST['Mail'];
$Nombre = $_POST['Nombre'];
$headers .= "From: $Nombre <$Mail>\n";
$headers .= "X-Mailer: PHP at hilerastours.com.ar\n";
$headers .= "Replay-to: <$Mail>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$headersDos .= "From: [email protected]\n";
$headersDos .= "X-Mailer: PHP at hilerastours.com.ar\n";
$headersDos .= "Replay-to: [email protected]\n";
$headersDos .= "Content-Type: text/html; charset=iso-8859-1\n";
mail("$mymail , [email protected]", $subject, "<html><body>". $html ."</body></html>", $headers);
mail("$Mail", "Gracias por tu interes", "<html><body>". $htmlDos ."</body></html>", $headersDos);
echo "&estatus=ok&";
}
?>

Y en el Flash esto:

System.useCodepage = true;

envia = new LoadVars();

Telefono.restrict = "0-9";

Nombre.tabIndex = 0;
Responsable.tabIndex = 1;
Telefono.tabIndex = 2;
Mail.tabIndex = 3;
Asunto.tabIndex = 4;
Destino.tabIndex = 5;
Comentarios.tabIndex = 6;

Alert = function (titu, cont) {
winAlertValid.gotoAndPlay(2);
winAlertValid.tituloWin = titu;
winAlertValid.resultado = cont;
};

btnSend.btn.onPress = function() {
enviarForma();
};

enviarForma = function () {

if (Nombre.text.length && Responsable.text.length && Telefono.text.length && Mail.text.length && Asunto.text.length && Destino.text.length && Comentarios.text.length) {

if (Mail.text.indexOf("@") != -1 && Mail.text.indexOf(".") != -1) {
Alert("Procesando", "Enviando Información");

envia.Nombre = Nombre.text;
envia.Responsable = Responsable.text;
envia.Telefono = Telefono.text;
envia.Mail = Mail.text;
envia.Asunto = Asunto.text;
envia.Destino = Destino.text;
envia.Comentarios = Comentarios.text;
envia.sendAndLoad("Formail.php", envia, "POST");
envia.onLoad = function(ok) {

if (ok) {
if (envia.estatus == "ok") {
Alert("Correcto !!", "Su mensaje ha sido enviado");
Nombre.text = "";
Responsable.text = "";
Telefono.text = "";
Mail.text = "";
Asunto.text = "";
Destino.text = "";
Comentarios.text = "";
} else {
Alert("Error Data !!", "Hubo un problema con el envio.");
}
}
};
} else {

Alert("Error !!", "El E-mail es incorrecto");
}
} else {
Alert("Error !!", "Faltan Campos marcados como requeridos");
}
};

Muchas Gracias!
  #2 (permalink)  
Antiguo 30/04/2008, 09:17
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Re: Problemas con Email Flash+PHP

Hola sebasosa. Bienvenid@ al foro.

Para hacer preguntas es preferible utilizar el foro que mejor se adapte a tu duda, así podrán ayudarte más usuarios.

Muevo tu mensaje al foro de PHP desde Bienvenida a Foros del Web.

Saludos,
  #3 (permalink)  
Antiguo 30/04/2008, 11:47
 
Fecha de Ingreso: septiembre-2004
Ubicación: Lima
Mensajes: 141
Antigüedad: 19 años, 7 meses
Puntos: 0
Re: Problemas con Email Flash+PHP

Serias tan amable de colgar el FLA , gracias
__________________
"Es mejor arder del todo ke consumirse poco a poco"
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:43.