Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 this reasonable.

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

like image 515
Jeffrey Lott Avatar asked Jul 19 '10 21:07

Jeffrey Lott


People also ask

What is plain text format with email?

A plain text email contains only text—no images, stylized fonts, or hyperlinks. Multi-part MIME (Multipurpose Internet Mail Extensions) bundles together a plain text version and an HTML version of the deployed email.

Does plain text allow formatting?

Plain text format doesn't include formatting (such as bold or italic text) or items like tables and images, but is readable for all recipients. Choose Format > Make Rich Text (available only when the current format is plain text).

Is HTML or plain text better for email?

While HTML email still has issues, most notably with compatibility, it still wins in the end. Plain text emails are often reliable in terms of email deliverability. Still, when it comes to overall user experience, visual display, and brand consistency, HTML wins out, hands down.


1 Answers

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.

like image 90
Will Dean Avatar answered Oct 28 '22 13:10

Will Dean