note 9366 added to mail

From: Date: Sun, 29 Oct 2000 16:48:49 +0000
Subject: note 9366 added to mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-7174@lists.php.net to get a copy of this message
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

« previous php.notes (#7174) next »