I'm a designer and usually only need a simple PHP mail script that sends text mails and redirects to a "thank you"- page. But now a client wants HTML mails because of the better readability (mails with lots of technical specifications). I found a nice, simple script that sends HTML mails and is even simpler than my old script, but sadly it doesn't have a redirect function. I would be very thankful if someone could help and just add the little redirect funtion to this script.
PS: the script also has to send German Umlauts and special characters.
Here is the script:
- Code: Select all
<?php
$destination = "your@mail.com";
$message = "<html>
<body style=\"font-family:Arial; font-size:10pt;\">
Hello,<br>
You have recieved a submission through the form on your website:<br><br>
";
//Gather posted variables:
foreach($_POST as $keys => $vars){
$message .= "<b>$keys</b>: $vars<br>";
}
$message .= "
</body>
</html>
";
mail($destination,"Form Submission",$message,"From: $email\n".
"Content-Type: text/html; charset=\"iso-8859-1\"\n".
"Content-Transfer-Encoding: quoted-printable".
"Content-Transfer-Encoding: 7bit\n".
"MIME-Version: 1.0\n");
?>
Any help is appreciated. Thanks a lot.


