/    Sign up×
Community /Pin to ProfileBookmark

HTML e-mail problem

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.

[CODE]
<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>
[/CODE]

to post a comment
HTML

15 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoJan 15.2005 — 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.
Copy linkTweet thisAlerts:
@jamesx521authorJan 15.2005 — How about this: is this correct?

[CODE]
<html>
<body>
<iframe src="http://www.e-travelbg.com/Letter.htm" width="500" height="500"
frameborder="0" scrolling="auto" name="letter">
</body>
</html>
[/CODE]
Copy linkTweet thisAlerts:
@PeOfEoJan 16.2005 — 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.
Copy linkTweet thisAlerts:
@jamesx521authorJan 16.2005 — 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.
Copy linkTweet thisAlerts:
@PeOfEoJan 16.2005 — 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.
Copy linkTweet thisAlerts:
@jamesx521authorJan 17.2005 — 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.

[CODE]
<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">
[/CODE]
Copy linkTweet thisAlerts:
@PeOfEoJan 17.2005 — just put a url at the top. Also your iframe syntax is wrong.
<i>
</i>if you do not support html email go here: <a href="http://www.e-travelbg.com/Letter.htm">http://www.e-travelbg.com/Letter.htm</a>
&lt;iframe src="ttp://www.e-travelbg.com/Letter.htm" style="height:500px; width:500px;"&gt;&lt;/iframe&gt;

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.
Copy linkTweet thisAlerts:
@ExuroJan 17.2005 — [i]Originally posted by jamesx521 [/i]

[B]I have Rich Text Editor On (which means it supports HTML emails).[/B][/QUOTE]

There's your probelm! You need to turn [i]off[/i] 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!
Copy linkTweet thisAlerts:
@PeOfEoJan 17.2005 — [i]Originally posted by Exuro [/i]

[B]There's your probelm! You need to turn [i]off[/i] 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! [/B][/QUOTE]
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. ?
Copy linkTweet thisAlerts:
@ExuroJan 18.2005 — [i]Originally posted by PeOfEo [/i]

[B]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. ? [/B][/QUOTE]

The only reason I said [i]not[/i] to use it is because I tried using an iframe first, and it didn't work ?.
Copy linkTweet thisAlerts:
@jamesx521authorJan 18.2005 — 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
Copy linkTweet thisAlerts:
@PeOfEoJan 18.2005 — [i]Originally posted by Exuro [/i]

[B]The only reason I said [i]not[/i] to use it is because I tried using an iframe first, and it didn't work ?. [/B][/QUOTE]
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.
Copy linkTweet thisAlerts:
@ExuroJan 18.2005 — [i]Originally posted by PeOfEo [/i]

[B]I was assuming a traditional frame would fail but I thought an Iframe would work[/B][/QUOTE]

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.
Copy linkTweet thisAlerts:
@jamesx521authorJan 28.2005 — 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
Copy linkTweet thisAlerts:
@ExuroJan 28.2005 — [i]Originally posted by jamesx521 [/i]

[B]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?[/B][/QUOTE]


[url=http://www.chami.com/html-kit/]HTML-Kit[/url] 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:
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;Strip Line Breaks&lt;/title&gt;
&lt;style type="text/css"&gt;
&lt;!--
body {text-align:center;}
textarea {width:80%;}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form onsubmit="txt1.value=txt1.value.replace(/n/g,'');return false;" action="#" method="get"&gt;
&lt;p&gt;&lt;textarea rows="15" cols="90" name="txt1"&gt;&lt;/textarea&gt;&lt;/p&gt;
&lt;p&gt;&lt;input type="submit" value="Strip Line Breaks" /&gt;&lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
×

Success!

Help @jamesx521 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...