I have a client who wants to receive in his e-mail the exact form, as filled out by the sender. (i.e. http://www.bistaterubber.com/belt_wizard.html )
How do I send HTML in e-mail using this mail() function?
Code: Select all
$success = mail($your_email_address, $subject, $inside_mail, "From: $name <$email>");
if($success) {
if($autoresponse == "yes") {
$response_subject = stripslashes($response_subject);
$response_mail = stripslashes($response_mail);
mail($email, $response_subject, $response_mail, "From: $owner_name <$your_email_address>");
}
if($after_url == "") {
// out put send info
print "<html><head><title>$subject</title>";
if($css_file != "")
print "<link rel="stylesheet" type="text/css" href="$css_file">";
print "</head><body bgcolor=$background_color background=$background_image text=$text_color link=$link_color vlink=$visited_link_color alink=$active_link_color><font face=$font_name size=$font_size>";
print "The following email has been sent successfully!<br><br><ul>";
for($i = 0; $i < count($fields); $i++) {
$actual_var = $fieldsї$i];
if($actual_var == "required_fields" || $actual_var == "after_url" || $actual_var == "check_email_address" || $actual_var == "subject" || $actual_var == "your_email_address" || $actual_var == "env_report" || $actual_var == "background_color" || $actual_var == "background_image" || $actual_var == "text_color" || $actual_var == "link_color" || $actual_var == "visited_link_color" || $actual_var == "active_link_color" || $actual_var == "font_name" || $actual_var == "font_size" || $actual_var == "highlight_color" || $actual_var == "css_file" || $actual_var == "owner_name" || $actual_var == "autoresponse" || $actual_var == "response_subject" || $actual_var == "response_mail")
print "";
else {
$actual_val = stripslashes($HTTP_POST_VARSї$actual_var]);
print "<li>$actual_var: $actual_val<br>";
}
}
print "</ul><a href="http://www.tb-designs.com" target="new">TB-Designs.com</a></font></body></html>";
} else {
headfunction($after_url);
}
} else {
print "<html><head><title>$subject</title>";
if($css_file != "")
print "<link rel="stylesheet" type="text/css" href="$css_file">";
print "</head><body bgcolor=$background_color background=$background_image text=$text_color link=$link_color vlink=$visited_link_color alink=$active_link_color><font face=$font_name size=$font_size>";
print "<b>Oops</b>, something is wrong with my php server, please send your email <a href="mailto:$your_email_address">here</a>...Sorry, 'bout the inconvenience.</font></body></html>";
}