|
Posted by Matthew Weier O'Phinney on 08/14/05 06:30
* John Taylor-Johnston <John.Taylor-Johnston@cegepsherbrooke.qc.ca>:
> Folks are complaining mail arrives and text will not wrap. $message
> comes directly from a textarea. Old mail readers, I guess?
Not necessarily old. Many of us use text-based mail readers, where
tradition and usability dictate line lengths of 72-80 characters. Also,
many mail user agents render text/plain without wrapping lines (or make
line wrapping optional).
> How can I make their life better and make the text wrap?
Yep. Investigate http://php.net/wordwrap:
> mail("info@foo.ca", stripslashes($subject), stripslashes($message),
> "Return-Path: <info@foo.ca>\r\nFrom: \"[foo] foo\" <info@foo.ca>\r\nbcc:
> $bcc \r\nReply-To: info@foo.ca \r\n"."X-Mailer: PHP/" . phpversion());
Make "stripslashes($message)" into
"wordwrap(stripslashes($message), 72)".
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
Navigation:
[Reply to this message]
|