[thelist] [fwd] Encoding e-mails sent from UNIX server with PHP, problem with CRLF

Winfried Huslik winfried at huslik.de
Fri May 11 23:33:27 CDT 2001


---------------------------------------------
This message was held by thelist software and
is being manually forwarded by a list admin.
Please remember to send emails in plain-text
format only, or they will not reach thelist
until it is later forwarded by a list admin.
---------------------------------------------


After setting up a somewhat complex site (www.owad.de) which makes
excessive use of sending mails from a remote UNIX server via PHP send
mail, one annoying problem showed up:

A small number of mail recipients received messed-up mails, i.e. that
CRLFs were omitted partially or completely, as if the whole message was
sent in one line. The mail looked fine if received on Eudora and Outlook
(WIN and Mac), Claris-Emailer, Netscape Communicator when testing. But I
assume that some mails must have passed some nasty mail servers that
didn't like my format. While using Eudora before, this never happened.
(Eudora generates format=flowed text.)

As a first measure I tried to include CRLFs instead of just CRs and LFs
but the problem persists; further more, the extra LF caused the well
known [] square to show up at the beginning of every line on some Mac
mailers. So my clue is that a LF should do at the end of a line. But why
should it get lost?

This occurred also at recipients @t-online.de where one would expect they
know how to treat mails. My header contains also:
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"

I also tried Base64 with my own mail accounts, but it converted my äöü to
äöü on the recipients side and insists on CR (\r) and does
not like the LF (\n) tested Mac to Mac. Besides that, I'm not sure
whether all mail programs can read Base64.

Now I got stuck! On Sunday I should send out a few thousand mails and
have no clue what to do about the problem.

Any idea what to include, how to convert or encode, where to read?

Thanks for your effort!

Winfried Huslik





More information about the thelist mailing list