Hi, I have a textarea in a form that when it is submitted it sends the contents of the textarea as a mail.
When I enter the Euro sign (€) and hit submit, the euro sign is printed as

€

When I display what was emailed on the screen, it displays OK.
The same thing happens for some other symbols:
ëäö is --> ëäö
éáó is --> éáó
ç is --> ç
€ is -->€

This is my code below that sends the mail. Can anyone help me with a solution to get this and the other symbols displayed correctly on the email.
Cheers,
Adrian.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
$textarea = $_POST['textarea2'];

if($textarea != "")
{
$mt = "THIS IS A TEST MAIL";

$emailaddress = "me@mymail.com";



$headers = "From: <$emailaddress>\n";
$headers .= "Return-Path: <$emailaddress>\n";
$headers .= "X-Sender: <$emailaddress>\n";
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Medium
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";


$emailme .= "<font face=\"arial\" size=\"2\"><b>$textarea<b> ";
$emailme = $textarea;
mail("$email_list","$mt",$emailme,$headers);

echo "<b>$textarea</b><br><br>";
}
?>

<html>
<body>
<form action="test8.php"  method="POST" enctype="multipart/form-data">
<textarea name="textarea2" ROWS="5" COLS="80"></textarea>
<br><input class="button" style="width:74px" type="submit" value="Send" name="btnSave">
</form>
</body>
</html>

    try changing your charset????.. the word unicode comes to mind.... idk

    also wouldnt hurt to use

    &euro;

    for your euro symbol

      setting my content-type to UTF-8 in the mail header fixed the majority of characters I tested it with.
      Content-Type: text/plain; charset="UTF-8"

      Cheers,
      Adrian

        Write a Reply...