MailFormat - sending email messages with carriage return

  • Thread starter Thread starter kplkumar
  • Start date Start date
K

kplkumar

I have an email message and the body of that message has to be
formatted in a certain way.

Currently it's Patient Name: XXX Patient Address: 87 XXXX Country: XXX

but I want to have carriage return after each field. For example,

Patient Name: XXX
Patient Address: 87 XXXX
Country: XXX


Can someone tell me how to acheive this? Thanks.
 
Why not just place a newline sequence in the string that you use for the
body? You can use the static NewLine property on the Environment class to
do this.

Hope this helps.
 
Hi NIcholas

I tried using \n infront of each field but it still seem to come out
with \n
Patient Name: XXX \nPatient Address: 87 XXXX \nCountry: XXX

Anyway, as per your previous email how do I get the NewLine property
going? Can you explain? Thanks in advance.
 
Are you sending HTML mail or plain text mail? If you are sending HTML,
then you will have to format the text to use line break tags (<br>) for new
lines, or delimit your paragraphs properly (with <p> and </p>).
 
Back
Top