Re: wrapping text

From: Date: Sun, 14 Aug 2005 03:30:46 +0000
Subject: Re: wrapping text
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-220578@lists.php.net to get a copy of this message
* 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/

« previous php.general (#220578) next »