Solved

HTML Newsletter in Hotmail

Posted on 2004-08-28
5
1,166 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
Comment Utility
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
Comment Utility
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:Squinky
Squinky earned 62 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mysql Encryption with PHP 8 45
Button Click 11 24
php image upload 3 24
Generating a set of random unique numbers 6 18
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now