title: mail() function at PHP with weird chars
body: <p>I'm using the php mail function, it works kinda fine, i really don't like to use this function but will have to do for this one.</p>
  
  <p>So the problem is, the special european characters are being shown in a funny way on the email, i tried to set the codification to iso-8859-1 and the same is happening:</p>
  
  <pre><code>$to = $eemail;
  $subject = $campos[4];
  $message = $campos[5];
  $message = mb_convert_encoding($message, 'HTML-ENTITIES', 'iso-8859-1');
  $from = $campos[1];
  $headers = "From:".$from."\r\n";
  
  $headers .= "MIME-Version: 1.0\r\n";
  $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
  $headers .= "X-Priority: 3\r\n";
  $headers .= "X-Mailer: PHP". phpversion() ."\r\n";
  </code></pre>
  
  <p>The rest is a basic mail form, sent through AJAX:</p>
  
  <pre><code>$(function() {  
    $(".submita").click(function() {        
        var nome = $('#nome').attr('value');
        var email = $('#email').attr('value');
        var telemovel = $('#telemovel').attr('value');
        var loja = $('#loja').attr('value');
        var assunto = $('#assunto').attr('value');
        var mensagem = $('#mensagem').attr('value');
  
        var dataString = 'nome='+ nome + '&amp;email=' + email + '&amp;telemovel=' + telemovel + '&amp;loja=' + loja + '&amp;assunto=' + assunto + '&amp;mensagem=' + mensagem;
        $.ajax({
      type: "POST",
      url: "ajaxload/conemail.php",
      data: dataString,
      success: function() {
          $(".mensagem").fadeIn();
        }
        });
        return false;
    }); 
  });
  </code></pre>
  
  <p>What is going wrong? </p>