Formatting a table in a plain text email in C#
Asked Answered
A

2

11

I'm trying to send data in a tabular format via email and I was just told that some of our clients can't receive HTML formatted emails, which is what I was using. I tried to manage this using tabs, but the length of the strings varied too much to make this reasonable.

Is there a way to easily format tabular data in a plain text email?

Aviles answered 19/7, 2010 at 21:19 Comment(0)
P
7

I don't think you're going to find anything broadly reliable - you'll fall over the following:

  • Lots of people read email in proportional fonts, so padding with spaces doesn't work
  • Email clients don't agree about rendering tabs so you can't use them even without your char spacing problem.

What about sending a PDF attachment? I know there will be angry purists madly down-voting me for daring to suggest it, but it could free you up from an endless unsatisfactory fights with mailers.

Philbrook answered 19/7, 2010 at 21:23 Comment(1)
Unfortunately, the same people that can't read HTML mail on their phones, can't view PDFs on them either.Aviles
I
0

You could try to use a '-' to fill in the white space. It won't be perfect but it might work better than a tab or a space.

Isthmus answered 20/1, 2012 at 16:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.