Otro PHP / FLASH DILEMA FORMULARIO DE CONTACTO envía mensajes de correo electrónico en blanco

  • e.s.guardian
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 14, 2007
  • Mensajes: 8
  • Status: Offline

Nota Marzo 14th, 2007, 10:38 am

Tengo un formulario de contacto en mi sitio flash. En resumen, hay dos botones de enviar y claro, al hacer clic en el botón Enviar, su supone que llevará a marco etiqueta "correcta", pero no pasa nada...Mientras tanto, mi bandeja de entrada se está llenando de mensajes de correo electrónico en blanco. ¿Cuál es tan pasando? el formulario de PHP no está ganando mi variables?

Esto es lo que tengo en mi forma de Flash y Php forma
Código: [ Select ]
this.stop();
// -------------------<send form LoadVars>------------------- \
var gatherForm:LoadVars = new LoadVars();
var receiveForm:LoadVars = new LoadVars();
receiveForm.onLoad = function() {
    if (this.response == "passed") {
        name_txt.text = "";
        email_txt.text = "";
        phone_txt.text = "";
        msg_txt.text = "";
        trace("email sent");
        gotoAndStop("correct");
    }
};
function sendForm() {
    gatherForm.email_to = "eric.shomer@gmail.com";
    gatherForm.visitor_comments = msg_txt.text;
    gatherForm.visitor_name = name_txt.text;
    gatherForm.visitor_email = email_txt.text;
    gatherForm.visitor_phone = phone_txt.text;
    // You may want to try the absolute http to this file i.e. http://www.mydomain.com/form.php 
    // If you are testing on the local system and it doesn't know how to parse php,
    // you'll never get a response back from the file.
    gatherForm.sendAndLoad("http://www.bodyshopfitnesscenter.com/email.php", receiveForm, "POST");
}
// -------------------</send form LoadVars>------------------- \
//--------------------<submit button AS>---------------------\
// onRelease
submitBtn.onRelease = function() {
    if (email_txt.text == "" || phone_txt.text == "" || name_txt.text == "" || msg_txt.text == "") {
        gotoAndStop("error");
    } else {
        sendForm();
    }
};
//--------------------</submit button AS>---------------------\

<?php
/***************************************************\
* PHP 4.1.0+ version of email script. For more
* information on the mail() function for PHP, see
* http://www.php.net/manual/en/function.mail.php
\***************************************************/


// First, set up some variables to serve you in
// getting an email. This includes the email this is
// sent to (yours) and what the subject of this email
// should be. It's a good idea to choose your own
// subject instead of allowing the user to. This will
// help prevent spam filters from snatching this email
// out from under your nose when something unusual is put.

$sendTo = "eric.shomer@gmail.com";
$subject = "Web Site Reply";

// variables are sent to this PHP page through
// the POST method. $_POST is a global associative array
// of variables passed through this method. From that, we
// can get the values sent to this page from Flash and
// assign them to appropriate variables which can be used
// in the PHP mail() function.


// header information not including sendTo and Subject
// these all go in one variable. First, include From:
$headers = "From: " . $_POST["name"] ." ". $_POST["email"] . "<" . $_POST["phone"] .">\r\n";
// next include a replyto
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
// often email servers won't allow emails to be sent to
// domains other than their own. The return path here will
// often lift that restriction so, for instance, you could send
// email to a hotmail account. (hosting provider settings may vary)
// technically bounced email is supposed to go to the return-path email
$headers .= "Return-path: " . $_POST["email"];

// now we can add the content of the message to a body variable
$message = $_POST["message"];


// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);

?>
  1. this.stop();
  2. // -------------------<send form LoadVars>------------------- \
  3. var gatherForm:LoadVars = new LoadVars();
  4. var receiveForm:LoadVars = new LoadVars();
  5. receiveForm.onLoad = function() {
  6.     if (this.response == "passed") {
  7.         name_txt.text = "";
  8.         email_txt.text = "";
  9.         phone_txt.text = "";
  10.         msg_txt.text = "";
  11.         trace("email sent");
  12.         gotoAndStop("correct");
  13.     }
  14. };
  15. function sendForm() {
  16.     gatherForm.email_to = "eric.shomer@gmail.com";
  17.     gatherForm.visitor_comments = msg_txt.text;
  18.     gatherForm.visitor_name = name_txt.text;
  19.     gatherForm.visitor_email = email_txt.text;
  20.     gatherForm.visitor_phone = phone_txt.text;
  21.     // You may want to try the absolute http to this file i.e. http://www.mydomain.com/form.php 
  22.     // If you are testing on the local system and it doesn't know how to parse php,
  23.     // you'll never get a response back from the file.
  24.     gatherForm.sendAndLoad("http://www.bodyshopfitnesscenter.com/email.php", receiveForm, "POST");
  25. }
  26. // -------------------</send form LoadVars>------------------- \
  27. //--------------------<submit button AS>---------------------\
  28. // onRelease
  29. submitBtn.onRelease = function() {
  30.     if (email_txt.text == "" || phone_txt.text == "" || name_txt.text == "" || msg_txt.text == "") {
  31.         gotoAndStop("error");
  32.     } else {
  33.         sendForm();
  34.     }
  35. };
  36. //--------------------</submit button AS>---------------------\
  37. <?php
  38. /***************************************************\
  39. * PHP 4.1.0+ version of email script. For more
  40. * information on the mail() function for PHP, see
  41. * http://www.php.net/manual/en/function.mail.php
  42. \***************************************************/
  43. // First, set up some variables to serve you in
  44. // getting an email. This includes the email this is
  45. // sent to (yours) and what the subject of this email
  46. // should be. It's a good idea to choose your own
  47. // subject instead of allowing the user to. This will
  48. // help prevent spam filters from snatching this email
  49. // out from under your nose when something unusual is put.
  50. $sendTo = "eric.shomer@gmail.com";
  51. $subject = "Web Site Reply";
  52. // variables are sent to this PHP page through
  53. // the POST method. $_POST is a global associative array
  54. // of variables passed through this method. From that, we
  55. // can get the values sent to this page from Flash and
  56. // assign them to appropriate variables which can be used
  57. // in the PHP mail() function.
  58. // header information not including sendTo and Subject
  59. // these all go in one variable. First, include From:
  60. $headers = "From: " . $_POST["name"] ." ". $_POST["email"] . "<" . $_POST["phone"] .">\r\n";
  61. // next include a replyto
  62. $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
  63. // often email servers won't allow emails to be sent to
  64. // domains other than their own. The return path here will
  65. // often lift that restriction so, for instance, you could send
  66. // email to a hotmail account. (hosting provider settings may vary)
  67. // technically bounced email is supposed to go to the return-path email
  68. $headers .= "Return-path: " . $_POST["email"];
  69. // now we can add the content of the message to a body variable
  70. $message = $_POST["message"];
  71. // once the variables have been defined, they can be included
  72. // in the mail function call which will send you an email
  73. mail($sendTo, $subject, $message, $headers);
  74. ?>
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Marzo 14th, 2007, 10:38 am

  • e.s.guardian
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 14, 2007
  • Mensajes: 8
  • Status: Offline

Nota Marzo 14th, 2007, 5:04 pm

cualquier Tomadores?
  • IceCold
  • Guru
  • Guru
  • Avatar de Usuario
  • Registrado: Nov 05, 2004
  • Mensajes: 1254
  • Loc: Ro
  • Status: Offline

Nota Marzo 14th, 2007, 11:49 pm

1. u escribió:
gatherForm.sendAndLoad ( "p http://www.bodyshopfitnesscenter.com/email.ph", receiveForm, "POST"); -> theres un espacio entre "email.ph" y "p".
Si usted copiar y pegar el código de su archivo de Flash, entonces eliminar mejor el espacio.
2. es http://www.bodyshopfitnesscenter.com/email.php de hecho el envío de correos electrónicos? probar con un formulario HTML simple con action = "http://www.bodyshopfitnesscenter.com/email. php "
, que tiene 3 textos entrada con el nombre: nombre, correo electrónico, teléfono...y un botón de enviar.
3. Ud. está enviando a PHP:
Código: [ Select ]
  gatherForm.email_to = "eric.shomer@gmail.com";
  gatherForm.visitor_comments = msg_txt.text;
  gatherForm.visitor_name = name_txt.text;
  gatherForm.visitor_email = email_txt.text;
  gatherForm.visitor_phone = phone_txt.text;
  1.   gatherForm.email_to = "eric.shomer@gmail.com";
  2.   gatherForm.visitor_comments = msg_txt.text;
  3.   gatherForm.visitor_name = name_txt.text;
  4.   gatherForm.visitor_email = email_txt.text;
  5.   gatherForm.visitor_phone = phone_txt.text;

pero el código php esperar sólo el nombre, email y teléfono -> ver $ _POST [ "name"], $ _POST [ "email"], $ _POST [ "phone"]
Así que, o cambia los archivos PHP para conseguir la correcta Nuevo variables nombre, o se cambia el archivo flash
4. si el php y archivos SWF no están en el mismo dominio, puede haber chanches el correo electrónico no se envía, ya que el servidor SMTP puede limitarse a un mismo dominio. Si están en el mismo dominio, a continuación, utilizar mejor ruta de acceso relativa en lugar de la ruta de acceso absoluta: "http://www.bodyshopfitnesscenter.com/email.php"
5. Si desea mostrar el éxito / fracaso de la enviar un mensaje, entonces usted tendrá que enviar realmente algo a flash, utilizando:
echo "respuesta = pasado"; / / -> si el éxito
o
echo "respuesta = no"; / / -> si no
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • billlly
  • Born
  • Born
  • No Avatar
  • Registrado: Jun 16, 2009
  • Mensajes: 1
  • Status: Offline

Nota Junio 16th, 2009, 2:41 am

Eeeks lo que un pepinillo respuestas bonito pero creo que nuestro amigo está teniendo algunos problemas con los conceptos básicos. Niza cadenas de fantasía código son frescas, pero sólo su derecho de enviar correo electrónico 3 líneas de escritura son todo lo que necesita, entonces no se ataron en desposeídos cuando algo no funciona eche un vistazo a este destello libre de correo electrónico con forma de PHP se puede ver no es tan difícil para enviar correos electrónicos con flash y PHP:]
Fuente es gratis.

¡Echa un vistazo al código en el archivo de origen no hay mucho pero funciona todo el tiempo. : ]

descargar
http://electronwebdesign.com/e.mail.form.zip


sitio
http://www.electronwebdesign.com/
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Junio 16th, 2009, 5:18 am

Sus dos años después Billy. Supongo theyve resuelto por ahora.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Publicar Información

  • Total de mensajes en este tema: 5 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 67 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC