Flash email form

hi i just did the flash email form tutorial which is found here my problem is that the emails sent to me look kinda like this

From : <TEXTFORMAT LEADING=“2”>
Reply-To : <TEXTFORMAT LEADING=“2”><P ALIGN=“LEFT”><FONT FACE=“Arial Black” SIZE=“12” COLOR="#999999" LETTERSPACING=“0” KERNING=“0”>my name</FONT></P></TEXTFORMAT>
Sent : Monday, March 20, 2006 1:45 AM
To : drawvennn@hotmail.com
Subject : Reseravtion
<TEXTFORMAT LEADING=“2”><P ALIGN=“LEFT”><FONT FACE=“Arial Black”
SIZE=“12” COLOR="#999999" LETTERSPACING=“0”
KERNING=“0”>testing</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=“2”><P
ALIGN=“LEFT”><FONT FACE=“Arial Black” SIZE=“12” COLOR="#999999"
LETTERSPACING=“0” KERNING=“0”>testing 1 2</FONT></P></TEXTFORMAT>

none of it is clear it says the zize letterspacing and a whole bunch of other things as you can see. this is the php file i have
<?php
$sendTo .= "drawven@gmail.com";
$subject .= “Reservation”;
$headers .= "From: " . $_POST[“name”];
$headers .= “<” . $_POST [“email”] . ">
";
$headers .= "Reply-To: " . $_POST[“email”] . "
";
$headers .= "Return-Path: " . $_POST[“email”];
$headers .= "Phone: " . $_POST[“phone”];
$message .= $_GET[“address”]. "

". $_GET[“city”]. "

". $_GET[“zip”];
mail($sendTo, $subject, $message, $headers);
?>
i’m wondering, is this because of flash or the php? can anyone help me

Try adding the start and end tags for html and body to your message. Also try adding the content-type and mime type to your message.

how would i go about doing that?

  1. Your php code is extremely insecure. You must check incoming data for validity, cuz somebody can exploit your form to send spam etc.
  2. Its alot easier to use some special php library, like well-known http://phpmailer.sourceforge.net/

Im having the same problem. Did you ever get this fixed?

Interesting… If it’s a flash issue, I won’t be much help - laugh that should be my standard disclaimer from now on :slight_smile:

I’d check over your PHP code. It may not be an issue on your server (depending on the error level) but you should define your variables before you append to them.

Basically…

$headers .= "From: " . $_POST["name"];
$headers .= "<" . $_POST ["email"] . ">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-Path: " . $_POST["email"];

Should be…

$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST ["email"] . ">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-Path: " . $_POST["email"];

Notice the first line should not have a .= since you hadn’t defined the variable $header before. (Or at least not in the code you show)

Make sure that when you’re sending the mail that you send it the way you want it sent. If you’re trying to send the email as HTML then make sure to include a header with the correct content-type. Something like:

$headers  = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
$headers .= "From: " . $_POST["name"];
$headers .= "<" . $_POST ["email"] . ">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-Path: " . $_POST["email"];

For plain text I believe it’s: Content-type: text/plain;

I got this working, I used the method in this thread to pass the variables to php. http://www.kirupa.com/forum/showthread.php?t=207202&highlight=flash+email+form

works fine now. For some stupid reason flash was formatting the text with html.