Link to home
Start Free TrialLog in
Avatar of TonyCabone
TonyCabone

asked on

Can't get my html email to display correctly

I have a very simple html email that won't display correctly. Works fine in web browsers but not in email programs. See code attached.

Any ideas why it won't work?
Avatar of sunithnair
sunithnair

Where is the code?
Avatar of TonyCabone

ASKER

that's weird it was in my initial post, sorry!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Business</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #000000;
}
body {
	background-color: #FFFFFF;
}
a {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #333333;
}
a:visited {
	color: #000000;
}
a:hover {
	color: #999966;
}
a:active {
	color: #999966;
}
.style1 {
	color: #FFFFFF;
	font-size: 9px;
}
.style5 {
	font-size: 12px;
	color: #3366CC;
	font-style: italic;
	font-weight: bold;
}
a:link {
	color: #000000;
}
.style6 {
	color: #CCCCCC;
	font-weight: bold;
}
.style7 {color: #FFFFFF}
-->
</style></head>
 
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="63" height="18">&nbsp;</td>
    <td width="472"><div align="right">Can't see this email? <a href="http://www.tekspec.com.au">Click Here</a></div></td>
    <td width="65">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><img src="http://www.tekspec.com.au/images/banner.jpg" alt="banner" width="600" height="141" /></td>
  </tr>
  <tr>
    <td bgcolor="#FAF7F4">&nbsp;</td>
    <td bgcolor="#FAF7F4"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><span class="style5">business New Release Open Day</span></p>
      <p>&nbsp;</p>
      <p>Dear (insert name here)</p>
      <p>&nbsp;</p>
      <p><br />
        As a member of the business  Friends and Family  mailing list we would like to invite you to the inaugural  New Release  open on Easter Sunday, April 12th 2009.<br />
        <br />
      </p>
      <p><br />
        Come and try the new release Tempranillo, Grenache and Shiraz and see the winery in action. Things to see and do during the day will be;<br />
        <br />
        Grape fermentation<br />
        <br />
        Basket Pressing<br />
        <br />
        New Release Tastings<br />
        <br />
        Barrel Tastings<br />
        <br />
      And a barbecue picnic on the lawn</p>
      <p>&nbsp;</p>
      <p>Kids more than welcome. Look forward to catching up over Easter.<br />
        <br />
      </p>
      <p>Cheers,<br /> 
        <br />
        J</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p></td>
    <td bgcolor="#FAF7F4">&nbsp;</td>
  </tr>
  <tr>
    <td height="22" bgcolor="#000000">&nbsp;</td>
    <td bgcolor="#000000"><div align="center" class="style1"><span class="style6"><br />
          <span class="style7">Contact Details </span></span><br />
    <br />
    </div></td>
    <td bgcolor="#000000">&nbsp;</td>
  </tr>
</table>
</body>
</html>

Open in new window

Avatar of Jason C. Levine
Hi Tony,

That looks pretty vanilla.  

1) How is it screwed up?

2) How have you tested it so far?
How are you sending the email message?  Have you looked at the headers to see what it says for Content-type and to make sure the html portion is properly identified?  The source from the email message (edited to remove sensitive content) would help.
Have you tested various email clients to see if this is an issue with just one program/client or all?
bol
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
b0lsc0tt,

I'm wondering if the CSS in the header is the problem?  Best practices for email should have inline CSS only...
It could be, especially depending on the email client.  Like the rest that CSS is really basic.  I guess knowing if any of the html works (i.e. the table or some of the cells with inline style) would help.
bol
Thanks bol,

That got the image loading, now the only problem I'm having is the appearance of red dotted borders on the table cells. Any idea on how to stop that?

I use Mozilla Thunderbird.
 
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, b0lsc0tt. You'd think I'd know better.

Tony,

I should have said that you'll want to do a View Source to see what the styling looks like. Essentially, in addition to the embedded style sheet, each paragraph or div or cell needs to be individually styled -- and keep it as simple as you can. I would assume the lowest common denominator; if you start getting fancy, you're asking to break the HTML.

ep