Reputation: 13
I need to add an signature at the end of the body, heres what I have tried so far.
msg.Body = (fk.Status + "\n \n \n \n Best Regards \n" + User.Identity.Name.ToString() );
where msg
is:
MailMessage msg = new MailMessage()
But the newline isn't working. The mail is sending fine and everything, but it all comes in a one liner.
Is there a better way to add signature? or a way to manipulate the text?
Upvotes: 1
Views: 50
Reputation: 12491
If your email is Html use <br/>
:
msg.IsBodyHtml = true; // You need this to render mail as html
msg.Body = (fk.Status + @"<br/> <br/> <br/> <br/> Best Regards <br/>" + User.Identity.Name.ToString() );
Upvotes: 1