Strange formatting issue creating html email


I generate an email from a web form that our application form put into tables so it;s easier to read.

Here is a snippet:

  rs = Session.sesDB.SQLSelect("Select * from memapplications where memappkwy = " + Str(Session.gnRecNo))
  lsMsg = "<body><table border=""1"" cellspacing=""2"" cellpadding=""2"">"
  lsMsg = lsMsg +  "<tr><td width=""128"">Application ID: </td><td><strong>"
  lsMsg = lsMsg +  rs.Field("memappkwy").StringValue
  lsMsg = lsMsg +  "</strong></td></tr>\
  lsMsg = lsMsg +  "<tr><td width=""128"">Authorize.NET Transaction ID: </td><td><strong>"
  lsMsg = lsMsg +  rs.Field("TransactionID").StringValue
  lsMsg = lsMsg +  "</strong></td></tr>\

The problem is getting strange characters, here is what I get:

<<<---- What caused this
From hear down it;s all in a table.
Application ID: 14098
Authorize.NET Transaction ID: 1234567890
AmountUSD: $ 190

I can not figure out where all the "
" came from.

anybody got an idea?



You might want to try saving the HTML string out to a file and seeing if you are still getting the newlines. It may be the mail server pre-appending some meta information.

your line endings may be wrong.
I think emails are normally with EndOfLine.Windows, so use ReplacelineEndings functions.

is the representation of a unix new line character.

There is nothing in MSG before the first assignment. Where would I look for the

what is the
in ‘lsMsg = lsMsg + "
"’ do??

adds a newline or line break

i never use a "
" in my html report.

So where did they come from?