Re: note 9366 added to mail

From: Date: Tue, 31 Oct 2000 13:01:09 +0000
Subject: Re: note 9366 added to mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-7194@lists.php.net to get a copy of this message
You could also use the function wordwrap(), to simplify this task, e.g.: $message = wordwrap($message, 75); (The note above has been added to your contribution) --- philippe@cyberabuse.org wrote: > You may want to wrap the message you send to 75 > characters per line, so pine users wont bitch at > you. > > Here is the function: > > function mailwrap($message) { > $line=explode("\n", $message); > $message=""; > for ($i=0;$i<count($line);$i++) { > $line_part=explode(" ", trim($line[$i])); > $buf=""; > for ($e=0;$e<count($line_part);$e++) { > $buf_o=$buf; > if ($e==0) $buf.=$line_part[$e]; > else $buf.=" ".$line_part[$e]; > if (strlen($buf)>75 and $buf_o!="") { > $message.=$buf_o."\n"; > $buf=$line_part[$e]; > } > } > $message.=$buf."\n"; > } > return ($message); > } > > http://www.php.net/manual/function.mail.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/

« previous php.notes (#7194) next »