473,569 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2036
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(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&amp;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...

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
2708
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
5903
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 will see the links in the navbar change: http://www.clearpointsystems.com/ When I try to validate the page at http://validator.w3.org/ I get the...
2
1070
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 control and inside the table is a DataGrid Web control (freshly dropped in from the toolbox). If you save this form, close it and reopen it via...
12
3912
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 graphics, eg logos and even the recipients photo. Note that everything is embedded, no attachments are sent. ASPEmail works a treat but is very long...
0
1998
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 looooooong error. I can also see, when I add a reference to my project, that the Microsoft.Office.Core and the Outlook References have a yellow...
12
3969
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 //<!]> Is this trick grounded in any real information about HTML vs XHTML? I
7
2404
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
3604
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 (¿) as their first character. What creates it? How do we avoid it? Thanks! maria
17
1896
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" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.