Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html newsletter in outlook

Status
Not open for further replies.

zekmek

Programmer
Jun 12, 2003
44
PT
Hello everybody,

I have created an html newsletter that will be send by mail. When i visualise my newsletter in my browser, everything is perfect. But when i send the html file to my mail, there are problems with the display.
For example i can have a &quot;</td>&quot; displayed in the mail. I have checked and i am sure that my number of <td> and </td> is the same !!! I know where the problem is but i don't know how to resolve it:

in my html file i write:
<td colspan=&quot;7&quot; align=&quot;center&quot;><img src = &quot; width=&quot;1&quot; height=&quot;5&quot;></td>

When i look to source of my html mail in outlook, i can find on two lines:
on the first line:
<td colspan=&quot;7&quot; align=&quot;center&quot;><img src = &quot; width=&quot;1&quot; height=&quot;5&quot;><
on the second line:
/td>

And that's why i have a </td> displayed in my mail. This problem appears at a lot of other places...

Have somebody got an idea ?

Thanks all.
 
Post your entire message so we can see the complete layout.

There's always a better way...
 
Many mail servers\clients have a setting to force a word wrap at 'x' characters. The default is 76, this may be breaking up your lines.

It should only apply to plain text though so there may be a problem with your content headers.


Chris.


Indifference will be the downfall of mankind, but who cares?
 
Yes that's true, i have &quot;<%@ page contentType=&quot;text/plain&quot; %>&quot; in my header. What can i do ?

Thanks.
 
contenttype=&quot;text/html&quot; should fix the problem.


Chris.


Indifference will be the downfall of mankind, but who cares?
 
no it doesn't work best :-( i don't know what to do.
 
post your message header structure and some of the content. There may be something else.



Chris.


Indifference will be the downfall of mankind, but who cares?
 
Ok

Here is my header :
<head><TITLE>Newsletter Vivacances</TITLE><STYLE TYPE=&quot;text/css&quot;><!--A.lTNN{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: normal; text-decoration: none; line-height: 13px; COLOR: #000000}
A.lTNN:hover{ FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: normal; text-decoration: underline; line-height: 13px; COLOR: #FF6600}
TNN{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: normal; text-decoration: none; line-height: 13px; COLOR: #000000}
A.TNN,A:hover.TNN{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: normal; text-decoration: none; line-height: 13px; COLOR: #000000}
TNT{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 14px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #000000}
A.lTNT{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 14px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #000000;}
TOT{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 13px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #FF6600}
TGGJ{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #999999; text-align: justify}
A.lTGGJ{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #999999; text-align: justify}
A.TOGns,A:link.TOGns,A:visited.TOGns,A:hover.TOGns {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; text-decoration: none; FONT-WEIGHT: bold; line-height: 13px; COLOR: #FF6600}
A.TNGns,A:link.TNGns,A:visited.TNGns,A:hover.TNGns {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; text-decoration: none; FONT-WEIGHT: bold; line-height: 13px; COLOR: #000000}
A.TBGs,A:link.TBGs,A:visited.TBGs,A:hover.TBGs {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: bold; line-height: 13px; COLOR: #0099CC}
A.TBGs,A:link.TBGs,A:visited.TBGs,A:hover.TBGs {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12px; FONT-STYLE: normal; FONT-WEIGHT: bold; line-height: 13px; COLOR: #0099CC}
TNG{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #000000}
font.contentFont{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12px}font.contentFontOrange{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12px; COLOR: #FF5B00}--></STYLE></head>


Here is a part of my file:
<br><table width=&quot;576&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot;>
<tr bgcolor=&quot;ff3300&quot;>
<td colspan=&quot;7&quot; align=&quot;center&quot;><img src = &quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td colspan=&quot;7&quot; align=&quot;center&quot;><img src = &quot; width=&quot;1&quot; height=&quot;5&quot;></td>
</tr>
<tr>
<td align=&quot;center&quot;><a href=&quot;mailto:service-clients@vivacances.fr?subject=newsletter Vivacances&quot; style=&quot;text-decoration:none&quot; class=&quot;TOGns&quot;>NEWSLETTER_NOUS_CONTACTER</a></td>
<td bgcolor=&quot;ff3300&quot; width=&quot;1&quot;><img src = &quot; width=&quot;1&quot; height=&quot;1&quot;></td>
<td align=&quot;center&quot;><a href=&quot;jsp/profile_nli.jsp&quot;,null,null)&quot; class=&quot;TOGns&quot;>NEWSLETTER_COMPTEUR</a></td>
<td bgcolor=&quot;ff3300&quot; width=&quot;1&quot;><img src = &quot; width=1 height=1></td>
<td align=&quot;center&quot;><a href=&quot;jsp/profile_nli.jsp&quot;,null,null) class=&quot;TOGns&quot;>NEWSLETTER_MON_PROFIL</a></td>
<td bgcolor=&quot;ff3300&quot; width=&quot;1&quot;><img src = &quot; width=1 height=1></td>
<td align=&quot;center&quot;><a href=&quot;jsp/profile_nld.jsp&quot;,null,null)&quot; class=&quot;TOGns&quot;>NEWSLETTER_ME_DESABONNER</a></td>
</tr>
</table>




and how it appears in the source:
<br><table width=&quot;576&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot;><tr bgcolor=&quot;ff3300&quot;> <td colspan=&quot;7&quot; align=&quot;center&quot;><img src = &quot; width=&quot;1&quot; height=&quot;1&quot;></td></tr><tr> <td colspan=&quot;7&quot; align=&quot;center&quot;><img src = &quot; width=&quot;1&quot; height=&quot;5&quot;><
/td></tr><tr> <td align=&quot;center&quot;><a href=&quot;mailto:service-clients@vivacances.fr?subject=newsletter Vivacances&quot; style=&quot;text-decoration:none&quot; class=&quot;TOGns&quot;>Nous contacter</a></td><td bgcolor=&quot;ff3300&quot; width=&quot;1&quot;><img src = &quot; width=&quot;1&quot; height=&quot;1&quot;></td><td align=&quot;center&quot;><a href=&quot; class=&quot;TOGns&quot;>Compteur</a></td><td bgcolor=&quot;ff3300&quot; width=&quot;1&quot;><img src = &quot; width=1 height=1></td><td align=&quot;center&quot;><a href=&quot; class=&quot;TOGns&quot;>Mon profil</a></td><td bgcolor=&quot;ff3300&quot; width=&quot;1&quot;><img src = &quot; width=1 height=1></td><td align=&quot;center&quot;><a href=&quot; class=&quot;TOGns&quot;>Me d&eacute;sabonner</a></td></tr></table>
</td>
</tr>
</table>
 
ooops:
here is my header:

<%@ page contentType=&quot;text/html&quot; %>
<html>
<head>
<TITLE>NEWSLETTER_TITLE</TITLE>
<STYLE TYPE=&quot;text/css&quot;>
<!--
A.TNGns,A:link.TNGns,A:visited.TNGns,A:hover.TNGns {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; text-decoration: none; FONT-WEIGHT: bold; line-height: 13px; COLOR: #000000}
A.TBGs,A:link.TBGs,A:visited.TBGs,A:hover.TBGs {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: bold; line-height: 13px; COLOR: #0099CC}
A.TBGs,A:link.TBGs,A:visited.TBGs,A:hover.TBGs {FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12px; FONT-STYLE: normal; FONT-WEIGHT: bold; line-height: 13px; COLOR: #0099CC}
.TNG{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px; FONT-STYLE: normal; FONT-WEIGHT: bold; text-decoration: none; line-height: 13px; COLOR: #000000}
font.contentFont{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
font.contentFontOrange{FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12px; COLOR: #FF5B00}
-->
</STYLE>
</head>
 
I've added a doctype of

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

and it worked ok for me when set as stationery in OE6 and Outlook 2k.


Chris.






Indifference will be the downfall of mankind, but who cares?
 
put this after the <head> tag

<META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;>

Chris.


Indifference will be the downfall of mankind, but who cares?
 
still the same :-(((( but thanks though :)
 
Ok what are you using for an email client. there must be something I'm not seeing in the bigger picture


email me the newsletter as it stands and attach the code if you want.

temp email just in case it gets harvested
tektips@lee-road.dnsalias.com.

Chris.


Indifference will be the downfall of mankind, but who cares?
 
You need to put some line breaks into the jsp code. What is happening is the table is being constructed as a single line and will be breaking randomly (forced CRs inserted by the mail client )

not 100% up on jsp syntax but if you put a newline \n after the closing HTML tag on each response.write line {.....>\n');} this should solve it.


Chris.


Indifference will be the downfall of mankind, but who cares?
 
ok i'm going to try this, i 'll let you know
thanks
 
well i guess that was it !!! It works well now !!!
Thanks very much ChrisHirst :)

Best regards
 
No Problem


Chris.


Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top