473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

HTML Message Contains Exclamation Marks

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...
Nov 18 '05 #1
3 2021
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...

Nov 18 '05 #2
Here is the main function that accepts the message and builds it into a table for the HTML message:

Dim siteSettings As SiteSettings = CType(HttpContext.Current.Items("SiteSettings"), SiteSettings)
Dim sb As New StringBuilder

' create the header
sb.Append("<table 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("<table id=""AutoNumber1"" 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.GetURL(MailTo) & "/images/tabimage2.gif"" id=""imgTabImage"" 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.GetURL(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=""#4a7ac9"" height=""20""></td>")
sb.Append("</tr>")
sb.Append("<tr>")
sb.Append("<TD style=""WIDTH: 9px"" noWrap width=""9"" bgColor=""#749cde""></TD>")
sb.Append("<td style=""WIDTH: 87px"" noWrap width=""87"" bgColor=""#749cde""><a id=""HyperLink1"" class=""OtherTabs"" href=""http://" & MailServer.GetURL(MailTo) & "/default.aspx?menuid=1&amp;showlogin=1&remindme=0"" target=""_blank"">Login</a></td>")
sb.Append("<td style=""WIDTH: 580px"" noWrap width=""580"" bgColor=""#749cde""></td>")
sb.Append("</tr>")
sb.Append("</table>" & Chr(10))
sb.Append("<TABLE id=""Table1"" cellSpacing=""0"" cellPadding=""0"" width=""100%"" bgColor=""darkblue"" background=""http://" & MailServer.GetURL(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("<html>")
sb.Append("<head>")
sb.Append("<link REL=""stylesheet"" type=""text/css"" href=""http://" & MailServer.GetURL(MailTo) & "/default.css""></link>")
sb.Append("</head>")
sb.Append("<body topmargin=""0"" leftmargin=""0"">")
'sb.Append("<DIV>")

' add the header
sb.Append(Header)

sb.Append("<TABLE 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.GetURL(MailTo) & "/Images/Quads/" & siteSettings.AlphaChar & "1.JPG""></TD>")
sb.Append("<TD style=""BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(http://" & MailServer.GetURL(MailTo) & "/Images/Quads/" & siteSettings.AlphaChar & "2.JPG); BACKGROUND-REPEAT: no-repeat"" align=""center"">")
sb.Append("<P><STRONG><FONT size=""4"">Highland 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("<TABLE class=""normal12"" 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.GetURL(MailTo) & "/Images/Quads/" & siteSettings.AlphaChar & "3.JPG""></TD>")
sb.Append("<TD style=""BACKGROUND-POSITION: left top; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(http://" & MailServer.GetURL(MailTo) & "/Images/Quads/" & siteSettings.AlphaChar & "4.JPG); BACKGROUND-REPEAT: no-repeat; HEIGHT: 176px"">")

' add the body
sb.Append(Body)

sb.Append("<P align=""center""><FONT size=""3""><STRONG><EM>""Stay Connected with your Community""</EM></STRONG></FONT></P>")

sb.Append("</TD>")
sb.Append("</TR>")
sb.Append("</TABLE>" & Chr(10))

sb.Append("<TABLE 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>How 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.GetURL(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.ToString(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...

Nov 18 '05 #3

I ran into the same problem, but this seemed to work...

http://tinyurl.com/cjqq

--
cm-mcninchPosted from http://www.pcreview.co.uk/ newsgroup acces

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: quikquic | last post by:
Suppose I download a html file with javascript in it, for example, <html> <body> <script language="JavaScript"> document.write("Hello"); </script> </body> </html>
2
by: deko | last post by:
I use variables in some links on my page. I need to send these variables so I can change the color of the links in the navbar when the user is on that page. If you click around on the site you...
2
by: Tony | last post by:
Can someone please tell me why Visual Studio wants to edit my Web form when I open it up via the designer? This only occurs if the form is in FlowLayout mode, it contains a standard HTML Table...
12
by: Dave G | last post by:
Apologies if this has been covered before - I couldn't find it. I currently use ASPEmail to create and send HTML emails from an Access database. The text is personalised and includes embedded...
0
by: Mads Westen | last post by:
Hi, I'm trying to code a application that can create a new email in Outlook I have coded my project in VS 2003, but now I have upgraded to VS 2005. I can not build my project anymore, I get a...
12
by: Peter Michaux | last post by:
Hi, I am experimenting with some of the Ruby on Rails JavaScript generators and see something I haven't before. Maybe it is worthwhile? In the page below the script is enclosed in //<!]> ...
7
by: R. Rajesh Jeba Anbiah | last post by:
What would be the ideal HTML markup for the following list of records (except table)? Student-1: Marks: Math : 100 Science : 100 History : 100 Student-2:
4
by: maria | last post by:
I only use C++ with Visual Studio 6.0 for string manipulations in thousands of HTML pages on my website. Many times, the output files of many of my C++ programs contain a spanish question mark (¿)...
17
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.