Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

EXCLAMATION MARKS APPEARING IN THE HTML EMAIL SENT USING SMTPMAIL IN ASP.NET --URGENT

Posted on 2004-10-30
10
Medium Priority
?
918 Views
Last Modified: 2012-06-21
I am trying to send an email using the SMTPmail and there are exclamation marks appearing in the text.
For example :

We are now conducting its investigati! on.

I would appreciate any help in this regard.

Thanks
0
Comment
Question by:gkhanduja
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 1

Expert Comment

by:dc_cypher
ID: 12453692
Make sure your lines are separated by carriate returns when appropriate (force wrap every ~100 characters or so -- just keep it low).  I had the same problem (albeit in a different environment) where after 1024 characters, exclamation points would appear in the text.
0
 
LVL 1

Expert Comment

by:dc_cypher
ID: 12453693
*carriage returns
0
 

Author Comment

by:gkhanduja
ID: 12453899
I am also creating a table in HTML I am sending and it header is also having the exclamation sign .... This is also due to the same reason or something else.
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 8

Expert Comment

by:pjcrooks2000
ID: 12454825
Can you post your html please?

0
 

Author Comment

by:gkhanduja
ID: 12457474
Here is the code:

I would appreciate any help. The exclamation marks are appearing just like that. They are not consistent, I tried word wrapping but exclamation marks shift here and there but they dont go.

*******************************************************************************************

        str = "Some text" & rightNow.ToString("MM/dd/yyyy") & ":"
        str2 = "Some text 0"
        str5 = "Some text 1"
        str6 = "Some text 2"
        str7 = "Some text 3"
        str3 = "Thank you."
        str4 = "For support: Support@xxx.com"
        'str5 = "Some text 4"
        If Not (Page.IsPostBack) Then

            str1 = "<html>" & _
                "<head>" & _
                "<meta http-equiv=" & Chr(34) & "Content-Language" & Chr(34) & "content=" & Chr(34) & "en-us" & Chr(34) & ">" & _
                "<meta name=" & Chr(34) & "GENERATOR" & Chr(34) & " content=" & Chr(34) & "Microsoft FrontPage 5.0" & Chr(34) & ">" & _
                "<meta name=" & Chr(34) & "ProgId" & Chr(34) & " content=" & Chr(34) & "FrontPage.Editor.Document" & Chr(34) & ">" & _
                "<meta http-equiv=" & Chr(34) & "Content-Type" & Chr(34) & " content=" & Chr(34) & "text/html; charset=windows-1252" & Chr(34) & ">" & _
                "<title>New Page 1</title>" & _
                "</head>" & _
                "" & _
                "<body>" & _
                "<IMG style=" & Chr(34) & "Z-INDEX: 101; LEFT: 9px; WIDTH: 983px; POSITION: relative; TOP: 9px; HEIGHT: 134px" & Chr(34) & " height=" & Chr(34) & "134" & Chr(34) & " alt=" & Chr(34) & "" & Chr(34) & " src=" & Chr(34) & "http://xxx.com/images/email_logo.bmp" & Chr(34) & " width=" & Chr(34) & "983" & Chr(34) & ">" & _
                "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">Dear " & Session("email1") & ",</font></p>" & _
                "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str & "</font></p>" & _
                  "<table border=" & Chr(34) & "1" & Chr(34) & " cellpadding=" & Chr(34) & "0" & Chr(34) & " cellspacing=" & Chr(34) & "0" & Chr(34) & " style=" & Chr(34) & "border-collapse: collapse & Chr(34) & "" bordercolor=" & Chr(34) & "#111111" & Chr(34) & " width=" & Chr(34) & "50%" & Chr(34) & " id=" & Chr(34) & "AutoNumber1" & Chr(34) & "><br>" & _
                    "<tr>" & _
                    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">Last Name</font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">First Name</font></td>" & _
    "<td width=" & Chr(34) & "1%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & "> </font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & ref1 & "</font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & ref2 & "</font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">Tracking Number</font></td>" & _
    "</tr>"


            For i = 0 To dg.Items.Count - 1
                name_last = dg.Items(i).Cells(1).Text.Trim()
                name_first = dg.Items(i).Cells(0).Text.Trim()
                cusref1 = dg.Items(i).Cells(2).Text.Trim()
                cusref2 = dg.Items(i).Cells(3).Text.Trim()
                trackingno = dg.Items(i).Cells(4).Text.Trim()


                str1 = str1 & _
                                "<tr>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & name_last & "</font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & name_first & "</font></td>" & _
    "<td width=" & Chr(34) & "1%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & "> </font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & cusref1 & "</font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & cusref2 & "</font></td>" & _
    "<td width=" & Chr(34) & "10%" & Chr(34) & " align=" & Chr(34) & "center" & Chr(34) & "><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & trackingno & "</font></td>" & _
    "</tr>"
            Next
            str1 = str1 & _
                    "</table><p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str2 & "</font></p>" & _
                    "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str5 & "</font></p>" & _
                    "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str6 & "</font></p>" & _
                    "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str7 & "</font></p>" & _
                    "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str3 & "</font></p>" & _
                    "<p><font face=" & Chr(34) & "Arial" & Chr(34) & ">" & str4 & "</font></p>" & _
                    "" & _
                    "</body>" & _
                    "" & _
                    "</html>"
0
 
LVL 1

Accepted Solution

by:
dc_cypher earned 200 total points
ID: 12459233
I'm not convinced that it isn't a failure to wrap lines properly because, from the looks of this code, everything in your string str is all on one line.  For all lines ending in "& _", try replacing that with "& vbCrLf & _".
0
 
LVL 3

Expert Comment

by:cheeky-monkey
ID: 12460554
We've had that exact same thing. Try using "str1 = str1 & " line by line (break them up into smaller lines) instead of "& _".
0
 

Author Comment

by:gkhanduja
ID: 12479321
Hi

I have introduced "& vbCrLf &_" in the code, we have 2 machines to test, on one machine this exclamation mark is appearing and on other it is not appearing.

Can you guys suggest something??

Thanks

0
 
LVL 1

Expert Comment

by:dc_cypher
ID: 12483280
Are they identical configurations?  If not, how do they differ?
0
 
LVL 3

Expert Comment

by:cheeky-monkey
ID: 12551992
Did you solve this?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question