Solved

HTML Newsletter in Hotmail

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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.
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 …

856 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