php email showing html

Hi
I have a form that is a contact page from a flash page. It is all working except that the email I receive shows html and therefore looks a mess. any ideas what i can do to fix this?
Appreciate any help at all.
many thanks
Tina
I have included what the email comes to me looking like then the php code beneath it.

[php]

c

t

c

c

From: <

[email protected]

>
Reply-To:

[email protected]


Return-path:

[email protected]

MIME-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1

the php code is as follows:

<?php $sendTo = "[email protected]"; $subject = "I have some music to sell "; $headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $phone = $_POST["phone"]."\r\n"; $name = $_POST["name"]."\r\n"; $format = $_POST["format"]."\r\n"; $quantity = $_POST["quantity"]."\r\n"; $title = $_POST["title"]."\r\n"; $message = $phone. $name. $format. $quantity. $title; mail($sendTo, $subject, $headers, $message ); ?>

[/php]

I’m surprised you’re getting it at all, the syntex is wrong. Its mail(to, subject, message, headers)

I don’t see how you’re getting html in there, unless its getting it from the submit form. All those attributes are depreciated though, its now done with the style attribute or a style sheet

It is very strange.
I changed the syntax but it makes no difference. One thing is that the form is part of a flash site, ie not html. so the submit button on the flash file uses AS2 onRelease {(form.loadVariables(“email.php”, “POST”);} so no CSS.
the variables that are called in the php file are generated in flash. Everything actually does work only that the email sent contains all this unwanted html.
I am a total novice at php and the code came mainly from kirupa. When I upload the flash and php example files they are fine and I receive an email with no html. The only difference is that I have more than one variable that is called into the body of the message, its the only thing I changed.
I am stumped.
thanks for any suggestions
tina

Sponsor our Newsletter | Privacy Policy | Terms of Service