Page 1 of 1

Special characters not supported by Hotmail and Apple Mail?

Posted: Mon May 22, 2006 11:29 am
by fastforward
Hi

I'm currently creating a website which sends HTML e-mails out to a few selected e-mail accounts. The system is working just fine, except Apple Mail and Hotmail (haven't tried in Outlook yet) doesn't support some special characters from my language: æøå. They are however supported in Gmail. Anyone know a workaround for this problem?

ex: æ = æ

My PHP code:

Code: Select all

<?php

// recipient and subject
$sendTo = $_POST["mortenkh@hotmail.com"];
$subject = $_POST["overskriftVar"];

// just some headers
$headers = "From: Panduro Hobby <info@panduro-hobby.dk> \r\n" . "MIME-Version: 1.0 \r\n" . "Content-type: text/html; charset=iso-8859-1 \r\n";
$headers .= "Reply-To: info@panduro-hobby.dk \r\n";
$headers .= "Return-path: " . $_POST["mailVar"];

// content
$message = $_POST["indholdVar"];

// if the message contains backslashes, they (the backslashes) are deleted
if (get_magic_quotes_gpc()) {
	$message = stripslashes($message); 
} 

// send
mail($sendTo, $subject, $message, $headers);

?>
HTML mail:

Code: Select all

<html>

<head>

<title>Macro-Design</title>

</head>

<body>

<table width="750px">

Kære Morten Kiehn Holst
<br><br>

<table width="100%" height="20px" bgcolor="#bdd8f6">Velkommen til vores lille lækre nyhedsbrev, her kan du læse om vores nyheder, idéer og andre spændende ting. </table>

<img src="http://macro-design.org/logo.jpg">

</table>

</body>

</html>
Thanks, and have a nice day :wink:

Posted: Mon May 22, 2006 11:36 am
by RobertGonzalez
I think this has to do with the charset you tell the app to use. I believe iso-8859-1 doesn't support some of the special characters that unicode does (or vice-versa). From time to time browsers are to blame for this as well, as some browsers don't support certain character sets.

You may want to look around for information on various charset types. Sorry I couldn't be of more help, but I am sure others here can be.

EDIT | I did a search for iso-8859-1 characters not showing properly and found a decent article with some information on charsets.

Posted: Mon May 22, 2006 11:40 am
by Chris Corbyn
Yeah you need an SMTP server with ESMTP that return 8BITMIME in it's EHLO response ;) You can check that by using telnet to connect to port 25 and typing EHLO then pressing enter.

Posted: Mon May 22, 2006 11:41 am
by RobertGonzalez
Whu-huh?!?!?! Wow, that was some of the best technical speak I have ever read in such a compact package. :D

Charset doesn't help

Posted: Thu Jun 01, 2006 11:22 am
by fastforward
@ Everah

I've tried to change the charset in my .php file, but it still doesn't work. (I used 'charset=ISO-8859-4')

Any other suggestions?

Posted: Thu Jun 01, 2006 11:34 am
by RobertGonzalez
Sorry, my understanding of character-encoding is limited at best. Wish I could fo more for you, but I am sure there are other developers around here that have a much richer understanding of the character encoding types and what they can do.