What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 11623 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > How to create a line break in Plain text email? ...
Poster

How to create a line break in Plain text email?

Replies: 5 | Posted by: Poster on 6/18/2009 | Category: C# Forums | Views: 21359 | Status: [Member]  


I am trying to send a plain text email using C# and have to create a line break in the body of the email, how to do that?

I tried placing \n but it didn't work.

Thanks


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Raja
Raja  
Posted on: 6/18/2009 7:08:30 AM
Level: Starter | Status: [Member]

Use \r\n for single line break. \n will not work.

Thanks

Regards,
Raja, USA

Poster, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Danmbuen
Danmbuen  
Posted on: 7/21/2009 7:49:09 PM
Level: Starter | Status: [Member]

this works for me. thanks raja!!!

Poster, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Lakhangarg
Lakhangarg  
Posted on: 8/31/2009 2:35:16 AM
Level: Silver | Status: [Member] [Moderator]

Use \r\n ..

This is the escape sequence for new line in plain text.

Thanks & Regards
Lakhan Pal Garg
http://lakhangarg.blogspot.com/

Poster, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Poster
Poster  
Posted on: 8/31/2009 5:04:30 AM
Level: Starter | Status: [Member]

Thanks Lakhangarg but my question was already answered by Raja and I got the same answer from you too.

Whats the use of giving the same answer just for the sake of answering?

Thanks

Poster, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Lakhangarg
Lakhangarg  
Posted on: 8/31/2009 5:11:06 AM
Level: Silver | Status: [Member] [Moderator]

Sorry poster.. i just read the questionand answer for the same.. sorry for duplicate answer.

Thanks
Lakhan Pal Garg

Poster, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 9:50:18 PM