Click to See Complete Forum and Search --> : HTML e-mail problem


jamesx521
01-15-2005, 11:12 AM
I used DreamweaverMX to make HTML e-mail that I need to start sending out. Sending it from Hotmail, with Rich Text Editor OFF -- works fine. However sending it from Yahoo, Hypermart.net, and Gmail doesn't mail it correctly. I already know that Hotmail and Yahoo don't like the CSS and DIVs, so I've got rid off them. Can you please e-mail this code to yourself and if you don't receive it properly, tell me what to fix so that the e-mail gets mailed okay. Thanks.


<html>
<body bgcolor="#ffffe5" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="708" height="386" border="0" cellpadding="0" cellspacing="0" id="Table">
<tr>
<td width="708" height="102" nowrap>
<table width="708" height="102"
border="0" cellpadding="0" cellspacing="0" id="TopHoldTable">
<tr>
<td width="708" height="102">
<a href="http://www.e-travelbg.com" target="_blank">
<img src="http://www.e-TravelBG.com/letter/Letter_logo.gif"
alt="Test" name="Logo" width="300" height="102" border="0" id="Logo"></a>
</td>
<td width="708" height="102" nowrap>
<img src="http://www.e-TravelBG.com/letter/Letter_contact.gif"
alt="Test" name="Contact" width="408" height="102" id="Contact">
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="708" height="284">
<table width="708" height="258" border="1"
cellpadding="12" cellspacing="6" bordercolor="#ffffe5">
<tr>
<td width="708" height="236" align="left"
valign="top"
bordercolor="#CCCCCC" style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#C0CFE2',
startColorstr='#FFFFFF', gradientType='0');">
<font color="#999999" size="3" face="Verdana, Arial, Helvetica, sans-serif">
Test</font></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

PeOfEo
01-15-2005, 11:15 AM
What I have suggested before was just send out an iframe and see if that works. If you use an iframe you can control the content from a distance a little better. But provide a link at the top of the email to the actual page for those who will not support it.

jamesx521
01-15-2005, 05:55 PM
How about this: is this correct?


<html>
<body>
<iframe src="http://www.e-travelbg.com/Letter.htm" width="500" height="500"
frameborder="0" scrolling="auto" name="letter">
</body>
</html>

PeOfEo
01-15-2005, 08:57 PM
Yes, except you do not need the html tags. But please not: the smtp server needs to be set for an html mail format, you can probably specify that with your server side script. I do not think you need the body tags either. But provide a url at the top for a nonhtml version.

jamesx521
01-15-2005, 09:16 PM
still it doesn't work on Hotmail.
I have Rich Text Editor On (which means it supports HTML emails). When I paste the code and email it to myself -- I get white blank space. I've got rid off of the <html> and <body> tags too.

PeOfEo
01-16-2005, 12:26 AM
That is why you put a url at the top ;). That is for all of the text based email people too. If you manage to get one method to work in hotmail but not in the others then you can always run an if statement to vary what gets sent.

jamesx521
01-16-2005, 09:26 PM
Is this correct way? I wouldn't know how to use the if command, so I'd rather get it with less commands in one shot. This way however with the iFrame, doesn't work on Hotmail, and I'm about to find out if it works on Yahoo or Hypermart.net.


<a href="http://www.e-travelbg.com/Letter.htm" target="letter">
<iframe src="http://www.e-travelbg.com/Letter.htm" width="500" height="500"
frameborder="0" scrolling="auto" name="letter">

PeOfEo
01-16-2005, 11:40 PM
just put a url at the top. Also your iframe syntax is wrong.

if you do not support html email go here: http://www.e-travelbg.com/Letter.htm
<iframe src="ttp://www.e-travelbg.com/Letter.htm" style="height:500px; width:500px;"></iframe>

you lacked the closing tag, which is probably why it failed the first time, but for some reason i did not notice that. I used some css for height and width, but you can go back to the old way if you like. But I reccomend using valid code for the actual page though. You do not need the scrolling auto bit... that is a default.

Exuro
01-16-2005, 11:42 PM
Originally posted by jamesx521
I have Rich Text Editor On (which means it supports HTML emails).
There's your probelm! You need to turn off the Rich Text Editor, then you use your original code from your first post (not the iframe) and it should work fine. I tested it on my Hotmail account and it worked for me!

PeOfEo
01-16-2005, 11:46 PM
Originally posted by Exuro
There's your probelm! You need to turn off the Rich Text Editor, then you use your original code from your first post (not the iframe) and it should work fine. I tested it on my Hotmail account and it worked for me! I suggested the frame because I have heard from someone that a few web mail provides kill css, and because I think a frame makes content maintenance easier. ;)

Exuro
01-17-2005, 07:18 PM
Originally posted by PeOfEo
I suggested the frame because I have heard from someone that a few web mail provides kill css, and because I think a frame makes content maintenance easier. ;)
The only reason I said not to use it is because I tried using an iframe first, and it didn't work ;).

jamesx521
01-17-2005, 09:49 PM
The iFrame not working (not showing) in Hotmail, nor Hypermart.net. I care more to make it working on Hypermart since the sender's e-mail and name is the name of the company and they're using Hypermart.

But, let's say I use hotmail, since the long html code worked there, (with rich text editor turned off). On hotmail I can change the senders name to whatever I want, but can I change the appearing e-mail of the sender to a desired e-mail address, not belonging to hotmail?

Or if I can't do that and I'm stuck using Hypermart's services, then what else should I try to make things work? Thanks.

-jms

PeOfEo
01-17-2005, 11:02 PM
Originally posted by Exuro
The only reason I said not to use it is because I tried using an iframe first, and it didn't work ;). Really? Huh. That is odd. I was assuming a traditional frame would fail but I thought an Iframe would work, I have seen the in emails before. Looks like I have some playing to do.

Exuro
01-17-2005, 11:29 PM
Originally posted by PeOfEo
I was assuming a traditional frame would fail but I thought an Iframe would work
It really makes a lot of sense for email clients like Hotmail to disable iframes. When content is embedded directly into an email then they can filter out things like images and JavaScript that you may not want displayed. However, if there is an iframe on the page it can execute malicious scripts, re-direct you, or display unwanted images because the client has no control over the content inside.

jamesx521
01-28-2005, 01:22 PM
I finally figured out that the tables weren't causing a problem in my HTML e-mail. (I had to use tables, because I couldn't use DIV and CSS for safety issues with HTML e-mails, and I also had problems with iFrames.)

So, the problem was that when I was pasting the HTML code, there were extra <br> being inserted, ...but it took days and hours to figure it out, because when I was pasting the code I was seeing the code that I was pasting. The <br> were invisible.

See, Dreamweaver moves and aligns my code to look neat. The problem is when I copy the code and paste it into the Compose Message Field of Gmail, Yahoo, and Hypermart.net, all of their e-mail editors took the blank spaces of Dreamweaver's code as <BR>. ..but didn't show up as I was pasting the code. That's like eating vegetables, then you get very sick, the surgeon operates on you and says "we pulled one too many rotten-ed hamburgers from you." ...But you didn't eat them?!

Hotmail wasn't doing that problem, but I had to specifically use Hypermart for the HTML e-mail, so I had to figure out how it works there.

So finally, I pasted the code in Simple Text, got rid off all the blank spaces, so the whole thing looked like a concrete wall and then copied and pasted that code in the Signature Field of Hypermart's Compose message settings (that was the only way to do it).

By the way, does anyone know of a similar editor to Simple Text that's free and it can strip away the blank spaces between lines of text automatically, so that one doesn't have to click the back space hundred times?

Thanks.

-jms

Exuro
01-28-2005, 02:14 PM
Originally posted by jamesx521
By the way, does anyone know of a similar editor to Simple Text that's free and it can strip away the blank spaces between lines of text automatically, so that one doesn't have to click the back space hundred times?

HTML-Kit (http://www.chami.com/html-kit/) support Regular Expression search/replace, so you can use that to get rid of all your line breaks. However, you could also use a simple JavaScript to strip out all the line breaks for you:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Strip Line Breaks</title>
<style type="text/css">
<!--
body {text-align:center;}
textarea {width:80%;}
-->
</style>
</head>
<body>
<form onsubmit="txt1.value=txt1.value.replace(/\n/g,'');return false;" action="#" method="get">
<p><textarea rows="15" cols="90" name="txt1"></textarea></p>
<p><input type="submit" value="Strip Line Breaks" /></p>
</form>
</body>
</html>