user707294 user707294 - 1 year ago 85
ASP.NET (C#) Question

how to give new line in mailmessage.body section

I have sent mail using SMTP (ASP.NET).

I have written text in one line only, but I want to be in next line.

I used

, but it's not working.

Answer Source


If you format your email as HTML you can add a <br /> to it.

To format as HTML use the IsBodyHtml property of the MailMessage class.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download