-
July 16th, 2012, 05:09 PM
#1
C# 2010 Email Line Feed problems
I've tried using "\r\n", "\n" and Environment.NewLine but all my results are the same when the email is sent. Basically i don't get any line feeds except after the first line. Everything else is appended tot he same line as the previous content.
If possible i'd also like it to be able to accept HTML tags such as <b> and <br> perhaps though this is not necessary.
Code:
mess += "Connection ID: " + result[0] + Environment.NewLine; // result[1] is timestamp information and is not needed so it was excluded.
mess += "Audit Inserted into DB: " + result[2] + Environment.NewLine;
mess += "Application Name: " + result[3] + Environment.NewLine;
mess += "Last Audit Time: " + result[4] + Environment.NewLine;
mess += "Audit: " + result[5] + Environment.NewLine;
mess += "Error Message: " + message.ToString();
mail.Subject = subject;
mail.Body = mess;
SmtpClient client = new SmtpClient(smtp);
client.Send(mail);
Thanks!
-
July 16th, 2012, 05:25 PM
#2
Re: C# 2010 Email Line Feed problems
thanks! I figured it out!
-
July 17th, 2012, 01:07 AM
#3
Re: C# 2010 Email Line Feed problems
Originally Posted by maurices5000
thanks! I figured it out!
how?????
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|