HTML in PHP autoresponse email

Hi.
I was wondering if there was a way to put html in the email that would be automatically sent upon form submission.
Or if there was a way to send a preformatted rtf instead of a bland txt.

TIA.

Should be just a matter of inserting the html tags in the strings you are using to format the e-mail and also a change to the mime type tags

<? $email_contents =
"Name: $name

Email: $email

Daytime Phone: $dphone

Mailing Address:
$maddr

Zip-Postal: $code

City: $city

State-Province: $region

Country: $country

Certificate Amount: $amount

Form submitted on: $form_submit_date

";
$replyemail = “http://www.dolphinencounters.com/thanks.htm”;

$formsend = mail (“$owner_email”, “$subject”, “$email_contents”, “From: $email
Reply-to:$email”);
mail (“$email”, “Thank You From Dolphin Encounters Ltd.”, “$replyemail”, “From: www.DolphinEncounters.com”);
print “$form_submitted_message”;
}

?>

as in that…

or even like this:

<? 
$email_contents =
"<html>
<body>
Name: $name<br>
Email: $email<br>
Daytime Phone: $dphone<br>
Mailing Address: 
$maddr<br>

Zip-Postal: $code<br>
City: $city<br>
State-Province: $region<br>
Country: $country<br>
Certificate Amount: $amount<br>


Form submitted on: $form_submit_date<br><br></body></html>";
$replyemail = "http://www.dolphinencounters.com/thanks.htm";


$formsend = mail ("$owner_email", "$subject", "$email_contents", "From: $email
Reply-to:$email");
mail ("$email", "Thank You From Dolphin Encounters Ltd.", "$replyemail", "From: www.DolphinEncounters.com");
print "$form_submitted_message";
}

?>

Need to set the Content-Type in header.


        $message = "<div style=\"width:90%; margin-left:1em; margin-right:1em; padding:-5px 5px 5px 5px; border:1px dashed #aaaaaa; background-color:#FDFDE6; font-size:12px; font-family:courier;\">You are a boob<br></div>";
    
    // To send HTML mail, the Content-type header must be set
    $headers = "From: MOMMY <mom@yours.com>
" . "MIME-Version: 1.0
" . "Content-type: text/html; charset=iso-8859-1";

    
    // SEND
    if(mail("youremail@email.com", "subject", $message, $headers)) { echo "

email sent
"; exit; }
    else { echo "mail did not send"; }

You are a boob

hahahahahhahahahahaha:D

hmm. this was a nice run but my ‘superiors’ were talking about another process… well at least they are now.
Thanks though, to both, my PHP know-how has been tweaked C:-)

Wait a minute, those fixes still only seem to apply to the info that i, client, would recieve. if you note in the

$replyemail = “http://www.dolphinencounters.com/thanks.htm”;
string im trying to apply the HTML or send an rtf to the form submitter.
I dunno if the fix skOOb did was the explanation, but id just rather it not be a plain txt readout in the auto-reply email…

hope that cleared the water.:nerd: