I'm trying to get strings to line up in an email. Everything looks fine when I set the Body of the MailMessage but things aren't lined up when I get the email.
MailMessage email = new MailMessage();
//...setup from/to/host/port etc
StringBuilder data = new StringBuilder();
data.AppendLine(string.Format("{0, -20} {1, -20}", "Id:", "26"));
data.AppendLine(string.Format("{0, -20} {1, -20}", "Name:", "Jeff"));
// this looks fine in console
Console.WriteLine(data.ToString());
email.Body = data.ToString();
// this looks fine in console
Console.WriteLine(email.Body);
When I get this email it's format is not lined up like email.Body text has it.