Solved

HTML Newsletter in Hotmail

Posted on 2004-08-28
5
1,175 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

803 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