Here is the main function that accepts the message and builds it into a table for the HTML message:
Dim siteSettings As SiteSettings = CType(HttpConte xt.Current.Item s("SiteSettings "), SiteSettings)
Dim sb As New StringBuilder
' create the header
sb.Append("<tab le style=""BORDER-COLLAPSE: collapse"" borderColor=""# 111111"" cellSpacing=""0 "" cellPadding=""0 "" width=""680px"" border=""0"">")
sb.Append("<TR> ")
sb.Append("<TD vAlign=""top"" width=""100%""> ")
sb.Append("<tab le id=""AutoNumber 1"" style=""BORDER-COLLAPSE: collapse; HEIGHT: 50px"" borderColor=""# 111111"" cellSpacing=""0 "" cellPadding=""0 "" width=""100%"" border=""0"">")
sb.Append("<tr> ")
sb.Append("<TD style=""WIDTH: 9px"" noWrap align=""right"" height=""31"" rowSpan=""2""></TD>" & Chr(10))
sb.Append("<td style=""WIDTH: 100px"" noWrap align=""right"" height=""31"" rowSpan=""2"">< font color=""#ffffff ""><img src=""http://" & MailServer.GetU RL(MailTo) & "/images/tabimage2.gif"" id=""imgTabImag e"" style=""WIDTH: 56.51%; HEIGHT: 31px"" height=""31"" width=""57"" border=""0""></font></td>")
sb.Append("<td style=""WIDTH: 100%; HEIGHT: 11px"" noWrap colSpan=""2"" height=""11"">< img src=""http://" & MailServer.GetU RL(MailTo) & "/images/bevel2.gif"" id=""imgBevel" " style=""WIDTH: 100%; HEIGHT: 11px"" border=""0""></td>")
sb.Append("</tr>")
sb.Append("<tr> ")
sb.Append("<td style=""WIDTH: 580px"" noWrap width=""580"" bgColor=""#4a7a c9"" height=""20""></td>")
sb.Append("</tr>")
sb.Append("<tr> ")
sb.Append("<TD style=""WIDTH: 9px"" noWrap width=""9"" bgColor=""#749c de""></TD>")
sb.Append("<td style=""WIDTH: 87px"" noWrap width=""87"" bgColor=""#749c de""><a id=""HyperLink1 "" class=""OtherTa bs"" href=""http://" & MailServer.GetU RL(MailTo) & "/default.aspx?me nuid=1&show login=1&remindm e=0"" target=""_blank "">Login</a></td>")
sb.Append("<td style=""WIDTH: 580px"" noWrap width=""580"" bgColor=""#749c de""></td>")
sb.Append("</tr>")
sb.Append("</table>" & Chr(10))
sb.Append("<TAB LE id=""Table1"" cellSpacing=""0 "" cellPadding=""0 "" width=""100%"" bgColor=""darkb lue"" background=""ht tp://" & MailServer.GetU RL(MailTo) & "/images/spacer.gif"" border=""0"">")
sb.Append("<TR> ")
sb.Append("<TD> </TD>")
sb.Append("</TR>")
sb.Append("</TABLE>" & Chr(10))
sb.Append("</TD>")
sb.Append("</TR>")
sb.Append("</table>" & chr(10))
Dim Header As String = sb.ToString
' build complete message
sb.Length = 0
sb.Append("<htm l>")
sb.Append("<hea d>")
sb.Append("<lin k REL=""styleshee t"" type=""text/css"" href=""http://" & MailServer.GetU RL(MailTo) & "/default.css""></link>")
sb.Append("</head>")
sb.Append("<bod y topmargin=""0"" leftmargin=""0" ">")
'sb.Append("<DI V>")
' add the header
sb.Append(Heade r)
sb.Append("<TAB LE class=""normal" " id=""Table3"" cellSpacing=""0 "" cellPadding=""0 "" width=""680px"" border=""0"">")
sb.Append("<TR> ")
sb.Append("<TD style=""WIDTH: 1px"" align=""right"" vAlign=""top""> <IMG src=""http://" & MailServer.GetU RL(MailTo) & "/Images/Quads/" & siteSettings.Al phaChar & "1.JPG""></TD>")
sb.Append("<TD style=""BACKGRO UND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(http://" & MailServer.GetU RL(MailTo) & "/Images/Quads/" & siteSettings.Al phaChar & "2.JPG); BACKGROUND-REPEAT: no-repeat"" align=""center" ">")
sb.Append("<P>< STRONG><FONT size=""4"">High land Meadows Estates</FONT></STRONG></P>")
sb.Append("<P>< FONT size=""2"">The official web site for the Highland Meadows Estates Homeowners Association</FONT></P>")
sb.Append("</TD>")
sb.Append("</TR>")
sb.Append("</TABLE>" & Chr(10))
sb.Append("<TAB LE class=""normal1 2"" id=""Table1"" cellSpacing=""0 "" cellPadding=""0 "" width=""680px"" border=""0"">")
sb.Append("<TR> ")
sb.Append("<TD style=""WIDTH: 1px"" align=""right"" vAlign=""top""> <IMG src=""http://" & MailServer.GetU RL(MailTo) & "/Images/Quads/" & siteSettings.Al phaChar & "3.JPG""></TD>")
sb.Append("<TD style=""BACKGRO UND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(http://" & MailServer.GetU RL(MailTo) & "/Images/Quads/" & siteSettings.Al phaChar & "4.JPG); BACKGROUND-REPEAT: no-repeat; HEIGHT: 176px"">")
' add the body
sb.Append(Body)
sb.Append("<P align=""center" "><FONT size=""3""><STR ONG><EM>""Stay Connected with your Community""</EM></STRONG></FONT></P>")
sb.Append("</TD>")
sb.Append("</TR>")
sb.Append("</TABLE>" & Chr(10))
sb.Append("<TAB LE id=""Table1"" cellSpacing=""0 "" cellPadding=""0 "" width=""680px"" border=""0"" height=""100"" valign=""bottom "">")
sb.Append("<TR> ")
sb.Append("<TD style=""WIDTH: 106px""></TD>")
sb.Append("<TD vAlign=""bottom ""><FONT face=""Arial"" size=""1"">")
sb.Append("<P>H ow to Unsubscribe: This message was delivered to " & MailTo & " on " & Format(Now.Date , "D") & ". To unsubscribe or change your options in receiving messages like this one, please visit <A href=""http://" & MailServer.GetU RL(MailTo) & """>www.hmehoa. com</A>, sign in and click on Edit My Account, or you can respond to this message and ask to be removed from this mailing list.</P>")
sb.Append("<P>Â © " & Convert.ToStrin g(Now.Year) & " Highland Meadows Estates Homeowners Association. All Rights Reserved.</P>")
sb.Append("</FONT></TD>")
sb.Append("</TR>")
sb.Append("</TABLE>" & Chr(10))
'sb.Append("</DIV>")
sb.Append("</body>")
sb.Append("</html>")
Return sb.ToString
"David Coe, MCP" wrote:
Can you post some code for how you are building the message?
"rvanvolken " wrote:
After sending an email message formatted for HTML using the STMP Mail function within .NET, my message arrives with exclamation marks throughout the text, which inadvertantly hinders the correct formatting of the text.
Importing the source from one of these messages to Microsoft Word, I was able to see that after each of the exclamation marks a hidden paragraph mark exists.
I've read other postings where the developer used StringBuilder and thought that was the problem, but I've tried constructing my messages with and without StringBuilder and still get the same result.
Is this a bug, or is it how I'm sending the message?
Any help would be greatly appreciated.
Ron...