A content-type for text/plain monospace?
Asked Answered
C

0

7

I want to send emails a bit more sophisticated than simple blocks of texts (add tables, alignment, styles and so on), something like :

+------------------------------------------------------------------------------+
|                                                                              |
|                               This is an email                               |
|                                                                              |
|  Hello, world!                                                               |
|                                                                              |
|  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy  |
|  nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut    |
|  wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit  |
|  lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum        |
|  iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel   |
|  illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto   |
|  odio dignissim qui blandit praesent luptatum zzril delenit augue duis       |
|  dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis         |
|  eleifend option congue nihil imperdiet doming id quod mazim placerat facer  |
|  possim assum. Typi non habent claritatem insitam; est usus legentis in iis  |
|  qui facit eorum claritatem. Investigationes demonstraverunt lectores        |
|  legere me lius quod ii legunt saepius. Claritas est etiam processus         |
|  dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare  |
|  quam littera gothica, quam nunc putamus parum claram, anteposuerit          |
|  litterarum formas humanitatis per seacula quarta decima et quinta decima.   |
|  Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in    |
|  futurum.                                                                    |
|                                                                              |
|                                                                  Thank you!  |
|                                                                              |
+------------------------------------------------------------------------------+

Is there a way to put a font family to a text/plain content-type ?

Courtmartial answered 6/3, 2013 at 21:48 Comment(8)
why don't you want to use html?Cutlor
Because some of my customers don't support it (those ones send me a picture of their screen when I ask for screenshots, I let you get my point :)).Courtmartial
I have the same issue: I try to insert a table in the middle of the e-amil but it seems impossible to control the font with which the reader will see the email. Because only monotypes fonts can align correctly such tables/ascii art.Hillock
I need the same for an HTTP service’s responses.Adverbial
Hello @mirabilos! Even though this question is quite old, I developed a solution for it: Monospace.php. As we are now in 2019, I guess there should be better anyway ;-)Courtmartial
This does not quite answer the question for the content type…Adverbial
Of course not, but it's a workaround if you need it though.Courtmartial
@AlainTiemblo: the question is not about generating such mails, because it's trivial with any text editor. The question is about ability of controlling how clients display plain text mails. I guess right now the best we can do is use MIME multipart/alternative and attach both plain text and HTML messages.Chunky

© 2022 - 2024 — McMap. All rights reserved.