0 Replies Latest reply on Mar 1, 2007 4:36 PM by ipuff

    email comes out as rendered html text

    ipuff
      Hi,
      I am using the DateField component in flash. I have to email the data once the user chooses the a specific date.( I am doing this because the DateField component is not a text field). So what I did is that that I posted the data to a input text, defined a variable on the text field and wrote a php script to email the text field. I have made sure that the text is in input format and "Render text as HTML" is turned off. But for some reason, the email sent out is still in HTML. i have tried every possible thing that I can think of, but it keeps emailing in HTML format. Can anyone please please please please help me. im putting the action script and the php script as well.

      Action Script Code:
      on (release)
      {

      import mx.controls.Alert;
      myClickHandler = function (evt){
      if (evt.detail == Alert.OK){

      }
      }
      Alert.show("Thank you very much. Your message has been sent.", "Reservation Alert", Alert.OK);

      if (pickDateText1 != undefined && pickTimeText1 != undefined && dropDateText1 != undefined && dropTimeText1 != undefined && vehicleTypeText1 != undefined && pickLocationText1 != undefined && dropLocationText1 != undefined) {

      loadVariablesNum ("reservation.php", 0, "POST");

      //name = "";
      //subject="";
      //message="";
      //email="";
      }
      }

      Php Script:

      <?
      $to = "email@address.com";
      $subject = "$_POST[pickLocationText1]";
      $msg = "Pick Date: $_POST[pickDateText1]\n\n";
      $msg .= "Pick Time: $_POST[pickTimeText1]\n\n";
      $msg .= "Drop Date: $_POST[dropDateText1]\n\n";
      $msg .= "Drop Time: $_POST[dropTimeText1]\n\n";
      $msg .= "Vehicle Type: $_POST[vehicleTypeText1]\n\n";
      $msg .= "Pick Up Location: $_POST[pickLocationText1]\n\n";
      $msg .= "Drop Location: $_POST[dropLocationText1]\n\n";
      $headers = "From: Titans Reservation <someemail@example.com>\r\n" .
      "Reply-To: someotheremail@example.com\r\n" .
      "X-Mailer: PHP/" . phpversion();
      mail($to, $subject, $msg, $headers);



      ?>


      Thanks