incorrect sender name


hi, i am first time try to use flash send the email by php, current now all functions work perfectly, no error during send and receive, but only the sender name, it looks like a little wrong format when i received.

in the email when i read, the sender is shown like this
From <P ALIGN=“LEFT”><FONT FACE=“Zurich Cn BT” SIZE=“11” COLOR="#3A4812" LETTERSPACING=“0” KERNING=“0”>test

when i open try to edit the sender contact in microsoft outlook, the Displays name tag is shown, and the E-mail address is show P ALIGN=“LEFT"FONT FACE=“Zurich Cn BT” SIZE=“11” COLOR=”#3A4812" LETTERSPACING=“0” KERNING=“0”/FONT/P

actually it should show the sender name Mr.tester, email address is, but it looks like getting the email address in sender name and put the text box element(fonts size, color and etc) in email address…

how can i fix it?, below is is the contact.php code i use.

<? 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.="".$mess[1]." This message from web.  ".$mess[0]."
"; } next($post_vars); } mail($_REQUEST['recipient'], $subject, " Contact letter
".$message." " , $headers); echo ("Your message was successfully sent! Thank you for contacting us, we will reply to your inquiry as soon as possible!"); ?>


no one that can help? :frowning:


When I read your post I get the impression a form is submitting HTML, but I probably read it wrong.


I’d look at using something like swiftmailer makes sending html emails easy also you can send a plant text and html email together so if the end user does not support html they’ll still have a readable email rather then a blank one.

It looks like $post_vars[‘your_email’][0] contains your table markup if that’s the case strip all tags from it

[php]$your_email = strip_tags($post_vars[‘your_email’][0]);[/php]