472,779 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 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 1997
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"...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.