Re: [thelist] PHP Mail and   ç é ê é

charles stuart javascript at enure.net
Thu May 5 17:47:07 CDT 2005


Hi,

I've done my best to convert to UTF and then send the mail as UTF, 
still no luck. I'm obviously not doing this right.

The emailed text has changed to: Â Â ç é ê é

Thank you for any help.



best,

Charles




<?php

if ($_POST)
  {
     $name 					= stripslashes(strip_tags(utf8_encode($_POST['name'])));
     $email 					= 
stripslashes(strip_tags(utf8_encode($_POST['email'])));
     $text 		 			= stripslashes(strip_tags(utf8_encode($_POST['text'])));

		if ($name != "" && $email != ""  && $text != "")
		{
		$headers .= "Content-type: text/plain; charset=UTF-8" . "\r\n";
      	$message = "$name ($email) has contacted you via the 
website.\n\n$text";

      	mail("cs at enure.net", "Contact via the website", $message, "From: 
\"$name\"<$email>", $headers);

   	     echo "thanks";
	
		}
	
         }
         else
         {

         ?>


            <form action="<?= $PHP_SELF ?>" method="post" id="sendmail">

            </form>

              <?php

         }

         ?>



On May 5, 2005, at 2:48 PM, Jan Brasna wrote:

> Convert it to UTF and send the mail as UTF with appropriate headers.
>
> -- 
> Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester and 
> archives of thelist go to: http://lists.evolt.org Workers of the Web, 
> evolt !
>



More information about the thelist mailing list