An exclamation mark is added randomly to my long email message body

My application (both asp and asp.net) sends email notice.  An exclamation mark is randomly added to my email message body.  I search Internet and found similar bugger in PHP email.  If I cut the message very short, the mark goes away.

http://www.tek-tips.com/viewthread.cfm?qid=913854

Please help.
Jinghui LiAsked:
Who is Participating?
 
moduloConnect With a Mentor Commented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 
ThogekCommented:
Question:
How is the message body text of your emails assembled?  (Database query? Form submission data? Etc?)
0
 
Jinghui LiAuthor Commented:
The message body text  is assembled in a variable and passed to the interface for both asp and asp.net.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
ThogekCommented:
Is that variable constructed using pieces from the querystring? form submission? data query?

If you just Response.Write that variable to the page, do you still see the exclamation points?
0
 
Jinghui LiAuthor Commented:
I print it to console.  No !  I use StringBuilder to construct the string.
0
 
ThogekCommented:
> I use StringBuilder to construct the string

I understand this.  But the parts of the string that you are constructing together via the StringBuilder do come from someplace, right?
0
 
Jinghui LiAuthor Commented:
Here is what I got from other experts. I have not tried it out yet.

Beginning with V1.1 of the framework, System.Web.Mail does no longer use Quoted-Printable encoding on HTML mails. Therefore, you should make sure yourself that no line exceeds 76 characters, which is the limit one should use for trasnport over SMTP. Adding line breaks may solve your problem.
0
 
Jinghui LiAuthor Commented:
I got helps from another posting.  It seems solved my problem.

http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21160997.html


Thanks a lot.
0
 
ThogekCommented:
Wow.  Wacky stuff -- basically a problem with too-long lines in SMTP, eh?  (http://mailformat.dan.info/body/linelength.html)  But at least ya found it...  :-)

You'd think the MailMessage class would have some sort of word-wrap-length property (like ASPMail does)...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.