Solved

HTML Newsletter in Hotmail

Posted on 2004-08-28
5
1,179 Views
Last Modified: 2006-11-17
Hi Friends,

How are you? I am sending HTML and TEXT emails to our subscribers. HTML emails comes perfectly in Yahoo, while gets distorted in Hotmail. Could you please guide me how could i solve this.

Thanks in advance.
0
Comment
Question by:dvpandya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
Diablo84 earned 63 total points
ID: 11923016
are you specifying the html content type in the headers

eg.

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

mail("to@something.com","subject","message",$headers);

(ie. headers are the optional 4th parameter in the mail function)
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 11923043
I have just tested with this script (sending to a hotmail address) and the html is displayed fine

<?php
$message = '
some html<br>
<table width="75%" border="1">
  <tr>
    <td>table</td>
    <td>data</td>
  </tr>
  <tr>
    <td><font color="#FF0000" face="Arial, Helvetica, sans-serif">table</font></td>
    <td>data</td>
  </tr>
</table>
';
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

mail("ADDRESS_REMOVED","test2",$message,$headers);
?>
0
 
LVL 25

Assisted Solution

by:Marcus Bointon
Marcus Bointon earned 62 total points
ID: 11923356
Hotmail does some extremely unpleasant things to HTML email, typically removing/rendering useless the html, head and body tags so that it doesn't clash with the page it's embedded in. This really means that you have to use either inline CSS styles, or evil font tags if things are going to look right. Any CSS included in your head tag will be ignored, which could go a long way to explaining why things don't look right in many cases. This article may be of interest:

http://alistapart.com/articles/cssemail/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question