how to preserve line breaks in the message

G

Guest

Hi, I'm generating email message from my web app using asp.net 2.0 mail
objects. Each line in the message displays certain info and they all lined up
one under another.To achive that in c# I add "\n" to the string to creat a
new line. Resulting message display exactly what I need in yahoo mail but
outlook strips out extra line breaks following its own logic by leaving some
and removing some. The result is a total mess. Ex:
Date: 07/27/2007 - 07/28/2007
Location: Eric P. Newman Education Center (new line is here) Amount Paid($):
980.00 (new line is here)Transaction ID: V78A0C34914F (new line is
here)Transaction Date: 11/1/2007 at 2:25 PM
--------------------------------------------
--------------------------------------------
Last Name: Doe
First Name: Joe

As you can see some of the lines bunched together, some stay where they
suppose to. All my code to generate these lines is in exactly the same form .
Ex:
strMsgBody += "Some info: " +SomeInfoValue+ "\n" ;
It looks just fine in other mail clients (ex.yahoo mail)
Whta is the deal and how to fix it? Thx!
 
G

Guest

I know that you can change Outlook setting on your PC for plain text
messages not to remove these breaks but how to deal with it when you send a
message out and people just see it this way?
 
V

VanguardLH

in message
I know that you can change Outlook setting on your PC for plain
text
messages not to remove these breaks but how to deal with it when you
send a
message out and people just see it this way?

If he is sending a plain-text message, it should work (provided the
MIME headers also say it is a plain-text message). If he is sending
HTML then he should be using HTML code (i.e., the <BR> tag).
 
M

msudrala

Where and how do you change Outlook settings for plain text messages not to
remove line breaks?
Thanks,
Marshal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top