|
Posted by Toby Inkster on 10/13/84 11:41
woof wrote:
> Everything works fine. What I would like to know however is whether it
> is always necessary to limit each line of the message to 70 characters,
> as is written in the documentation of the function (writing for
> instance $this->message = wordwrap($message, 70)).
RFC 822 (Standard for the Format of ARPA Internet Text Messages) and its
successor RFC 2822 (Internet Message Format) say:
| There are two limits that this standard places on the number of
| characters in a line. Each line of characters MUST be no more than
| 998 characters, and SHOULD be no more than 78 characters, excluding
| the CRLF.
In practice, it is *sometimes* safe to ignore this.
However, tf you want to allow long lines, there are smarter ways of doing
this rather than just ignoring the RFCs. For example, you could try using
one of the MIME encoding options provided by PHP.
e.g.
$msgenc = base64encode($message);
$hdrs = "Content-Type: text/plain\r\n"
. "Content-Transfer-Encoding: base64\r\n";
mail($to, $subject, $msgenc, $hdrs);
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
[Back to original message]
|