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.
As one expert suggests, this could be caused by character encoding that is triggered by use of high-hex-value characters or long lines in the body of the email.
Here is the problematic codes, which is in a loop.
StringBuilder bodyMsg = new StringBuilder();
..... long message
MailMessage Message = new MailMessage();
Message.To = "firstname.lastname@example.org";
Message.From = "email@example.com";
Message.Subject = "a subject of length like jasdlfkjsadfjsd flsdfjasdjf fdjasldfjasldfjlsdfjsdaj";
Message.Body = bodyMsg.ToString();
Message.BodyFormat = MailFormat.Html;
SmtpMail.SmtpServer = "there.com";