Formatting a table in a plain text email in C#
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 t开发者_运维问答his reasonable.
Is there a way to easily format tabular data in a plain text email?
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.
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.
精彩评论