473,396 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MailFormat - sending email messages with carriage return

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.

Feb 1 '06 #1
5 6608
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<kp******@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
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.

Feb 1 '06 #2
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.

Feb 1 '06 #3
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>).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<kp******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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.

Feb 1 '06 #4
I am sending it as plain text is all.

Feb 1 '06 #5
<kp******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am sending it as plain text is all.


Use Environment.Newline instead of \n
Feb 1 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frostillicus | last post by:
I'm trying to get an ASP to return a zip file to the remote browser from an Image (BLOB) field in SQL Server 2000 but Internet Explorer keeps saying: Cannot open C:\Documents and...
2
by: Zoran Nikolic | last post by:
I would like to store a body of an email message in database (or XML file) and retrieve it as a string. It works well with HTML messages, but have a problem to format text based messages. How to...
1
by: mg | last post by:
I'd like to send a single e-mail message message that uses the escape character \n as well as the html tag <i> in the body How can I combine the two parts of this merssage message.BodyFormat =...
6
by: Stick | last post by:
Hi, I am trying to start my email app (in this case Eudora) with a programatically generated email. However, Eudora does not seem to recognize any of the ways I have tried to create line...
3
by: Advo | last post by:
Hi there. Basically, I need to send some details but be able to use new lines. Before we were using asp, which used VbCrLf but now that im writing the pages in PHP we need another way. a...
3
by: garyusenet | last post by:
I have a programme written in C++, the programme is unmanaged and is an executable, i don't have any source code. I'm writing a C# program. I want to (a) start the programme minimized. (b) send...
3
by: dskinibbyb | last post by:
Hi Everybody, I am sending mail using the new class in .Net 2.0. Here while sending internal mails it is giving me problem. Carriage return, Line feed and Spaces are lost while sending mails....
2
by: Smithers | last post by:
I have a service that will periodically send email messages to system adminstrators. I would like for this service to send a email notification whenever the service is started and when it is...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.