[thelist] Formatting email messages

Bill Moseley moseley at hank.org
Tue Oct 13 21:00:28 CDT 2009


We have a form with a textarea that is used to add a message to an email
that is sent by the application.

The email is sent as a single part message with a text/plain content type.
I'm wondering if or how I should format the text entered into the text area
when creating the email message.

We are somewhat past the good old days of text email and where RFC2822 says
lines "SHOULD be no more than 78 characters" and where mail clients all have
the same width and font sizes.

Should I still wrap long lines at 78 chars or leave the text as was entered
directly in the text area?

Or should I create a multi-part email and wrap the text/plain part to 78
characters and add an text/html part for mail clients that want to wrap
lines at width/fonts dictate?

The textarea on the form is for text only -- so I would html-escape any text
entered.  It may not be uncommon to add long URLs in the text message, so it
would be mildly annoying to have those split up by the wrapping code.

What do you do?

Gmail when in "Plain Text" mode wraps the text.  When in "Rich Formatting"
mode creates a text/plain and text/html part.

Here's an example from Gmail (with some utf-8 example characters).


Content-Type: multipart/alternative; boundary=000e0cd290ceaa4dc70475daf6de

--000e0cd290ceaa4dc70475daf6de
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


We are somewhat past the good old days of text email and where RFC2822 says
lines "SHOULD be no more than 78 characters" and where mail clients all hav=
e
the same width and font sizes. =CF=84=CE=BF=E1=BF=A6 =E1=BD=88=CE=B4=CF=85=

=CF=83=CF=83=CE=AD=CE=B1 =E1=BC=98=CE=BB=CF=8D=CF=84=CE=B7.




--=20
Bill Moseley
moseley at hank.org

--000e0cd290ceaa4dc70475daf6de
Content-Type: text/html; charset=UTF-8

Content-Transfer-Encoding: quoted-printable

We are somewhat past the good old days of text email and where RFC2822
says lines "SHOULD be no more than 78 characters" and where mail
clients all have the same width and font sizes. =CF=84=CE=BF=E1=BF=A6 =E1=

=BD=88=CE=B4=CF=85=CF=83=CF=83=CE=AD=CE=B1 =E1=BC=98=CE=BB=CF=8D=CF=84=CE=
=B7.<br><br><br>
<br><br>-- <br>Bill Moseley<br><a href=3D"mailto:moseley at hank.org">moseley@=
hank.org</a><br><br>

--000e0cd290ceaa4dc70475daf6de--




-- 
Bill Moseley
moseley at hank.org



More information about the thelist mailing list