I have a php mail script that works well except for one minor fact. In Outlook (all version), the email comes in gibrish. If the email is read through an internet browser (like Gmail.com), it's fine. Is it possible to have the email look good in Outlook as well? I tried emailing it as HTML, still to no avail.
I can post the full code if necessary, but it looks something like this:
these are the headers:
$email = $_REQUEST['email']; $headers = 'From: ' . $email . "\r\n" . 'Reply-To: ' . $email . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-Type: Text/plain; charset=ISO-8859-8";
uses the mail() function:
mail ($to, $subject, $message, $headers);
I've tried to find ways to maybe encode incoming Outlook messages differently, but I (1) couldn't find a way to do so, and (2) would rather have it this way since it's supposed to go to a lot of people.
EDIT: After adding the line below, the message properly rendered both in browsers as well as Outlook. Hope this helps someone!
//convert to utf-8 $message = mb_convert_encoding( $message , 'ISO-8859-8' , 'utf-8' );
Should be pretty easy, change
Also be sure the creating page is encoded as
UTF-8 and that if a database is used, the table ( or whole db ) is in
UTF-8 unicode general
UTF-8 you can write the characters as they appear, don't use entities.