Jump to content

digitalecartoons

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Everything posted by digitalecartoons

  1. I've made a flash form which uses this script to send the input by mail: <?php // initialize variables for To and Subject fields $to = '[email protected]'; $subject = 'Een testmail'; $from = $_POST["from"]; $email = $_POST["email"]; $comments = $_POST["comments"]; // build message body from variables received in the POST array $message = "Van: $from \n\n"; $message .= "Email: $email \n\n"; $message .= "Bericht: $comments"; $message = stripslashes($message); //convert flash line breaks $message= str_replace("\r", "\n", $message); $message=nl2br($message); // add additional email headers for more user-friendly reply $additionalHeaders = "From: $from <".$email.">\r\n"; $additionalHeaders .= "Reply-To: ".$email."\r\n"; $additionalHeaders .= "MIME-Version: 1.0\r\n"; $additionalHeaders .= "Content-type: text/html; charset=utf-8\r\n"; // send email message $OK = mail($to, $subject, $message, $additionalHeaders); // let Flash know what the result was if ($OK) { echo 'sent=OK'; } else { echo 'sent=failed&reason='. urlencode('Er is een probleem met de server. Probeer het later nog eens.'); } ?> Works a bit besides accented characters like é ë ä ó ö ú etc. For example: when I use 'René' in the From field it arrives like 'RenX', but in text mode as in html mode. The From fiels displays 'RenX' I mean. When in text mode, the body text of the email displays 'René' however. When I view the mail in html mode, it also displays 'RenX' in the From field, but the body text displays 'rené'. How to I make it display René both in the From field and the body text? And both in text mode as in html mode?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.