Correctly displaying line breaks in text messages

We are having a problem with Outlook 2003 and text messages - usually generated from a non-email program such as the web or SQL Server.

When a text message is received (for example, a message generated by our SQL server), Outlook is incorrectly removing what it thinks are extra line breaks, when in fact they are not what anyone would consider "extra".

If you tell Outlook to restore the line breaks the message looks correct.
If you set in your options to tell Outlook "Do not remove extra line breaks in text messages" it looks correct.

However, these options are not viable for us.

We need a way to ensure that even if the user does not have the above box marked - that the message will be readable.

here is a sample message as received in Outlook:

Current Pay Period Missing (MO-Z)
Monthly Positive for Jul  6 2005  1:07PMA and/or C data missing for current Pay Period (MO-Z) for UNKNOWN DATESA and/or C data missing for next Pay Period (MO-Z) for UNKNOWN DATES


and what it should look like:

Current Pay Period Missing (MO-Z)
Monthly Positive for Jul  6 2005  1:07PM
A and/or C data missing for current Pay Period (MO-Z) for UNKNOWN DATES
A and/or C data missing for next Pay Period (MO-Z) for UNKNOWN DATES

Notice how in the first line DOES have a return in Outlook, but that the returns on the subsequent lines are missing. The code to generate the return in the message is the same (uses CHAR(13) in all cases)

I also tried generating the message using CHAR(13) + CHAR(10) - same effect.

We also have a text email message generated from ASP.NET (C#) using Environment.NewLine and have the same problem in that sometimes it honors the new lines and sometimes it does not.  It is not always the first line that causes the problem

Any ideas as to how to generate the email so that correct line breaks will not be improperly removed.
LVL 35
mrichmonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anthony PerkinsCommented:
Try using HTML output. As in <br> instead of CRLF
mrichmonAuthor Commented:
Unfortunately that doesn't work as it can only send text messages so it sends the text <br>
Anthony PerkinsCommented:
That is how we resolved that problem here.

Sorry it does not work for you.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

mrichmonAuthor Commented:
You were able to have MS SQL server 2000 send HTML email messages?
Anthony PerkinsCommented:
Yes, but then we are using xp_smtp_sendmail and I suspect you are using xp_sendmail, in which case you are out of luck.
mrichmonAuthor Commented:
Yes we are :o(
Anthony PerkinsCommented:
Sorry to hear that. Your only alternative (other than replace xp_sendmail with xp_smtp_sendmail) is to wait for SQL Server 2005 ...
mrichmonAuthor Commented:
Okay after much searching I found a solution.

Apparently adding 3 spaces (must be three and must be spaces) just before the CHAR(13) causes Outlook to not remove the newline character from text based messages.
Anthony PerkinsCommented:
That is very good to know.  I will certainly check that out.

Also, see here:
I answered my question myself. What do I do?
http://www.experts-exchange.com/Applications/MS_Office/Outlook/help.jsp#hi70
mrichmonAuthor Commented:
Thanks I know about that.  Being a Page Editor I often refer people to the instructions myself. :o)
Anthony PerkinsCommented:
>>Being a Page Editor I often refer people to the instructions myself.<<
And its not the first time you tell me that, is it?  Now where are my Alzheimer's pills ...
mrichmonAuthor Commented:
:o)

Have a nice weekend.
Anthony PerkinsCommented:
Lunchy,

>>A request has been made to delete/close this question<<
I know you are doing many of these a day and you are using a template, but actually the request was for a PAQ/Refund not a delete, which is fine with me.

>>mrichmon: If you have not responded to the Experts concerning your question or given an updated status, your points will not be refunded.<<
Done.

Anthony
ee_ai_constructCommented:
Question answered by asker or dialog deemed valuable.
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.