Hey Everyone.
I have a simple email form made in AS2, which of course sends an email through PHP.
I used Senocular’s tutorial as inspiration. http://www.kirupa.com/developer/actionscript/flash_php_email.htm
The problem I have is this - when recieving the email, the text has been stripped of all line breaks, which makes it quite hard to read.
I’m no flash or php shark, so I was wondering if anyone has a good way of preserving the format of the input-text being sent? I’ve serched over and over again, here, google, you name it. I can’t seem to find a way to preserve the line breaks.
php code:
<?php
header('content-type: text/html; charset: utf-8');
// Constants
$sendTo = "mail@mail.com";
$subject = "Subject line";
// Name Escape
$escName = mb_convert_encoding($_POST["Navn"], "ISO-8859-1", "UTF-8");
// message escape
$escMessage = mb_convert_encoding($_POST["Besked"], "ISO-8859-1", "UTF-8");
// Headers
$headers = "From: " . $escName;
$headers .= "<" . $_POST["Email"] . ">
";
$headers .= "Reply-To: " . $_POST["Email"] . "
";
$headers .= "Return-Path: " . $_POST["Email"];
mail($sendTo, $subject, $escMessage, $headers);
?>
note: After fiddling about for a whole day, I finally figured out how to get it to display special Danish characters in the email correctly - hence the mb_convert_encoding.
Any help would be appreciated.
Thanks
Stig