[Openfirst-cvscommit] base/config/functions mail.php,1.3,1.4
Brought to you by:
xtimg
From: <xt...@us...> - 2003-09-07 14:11:05
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1:/tmp/cvs-serv9651 Modified Files: mail.php Log Message: Make mail functions strip HTML content from plain-text portion of multipart e-mail messages. Index: mail.php =================================================================== RCS file: /cvsroot/openfirst/base/config/functions/mail.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mail.php 1 Sep 2003 15:38:16 -0000 1.3 --- mail.php 7 Sep 2003 14:11:01 -0000 1.4 *************** *** 35,38 **** --- 35,45 ---- $headers .= "Mime-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=openfirst-mail.boundry\r\n"; + + $textmessage = $message; + + while(stristr($textmessage,"<")) { + $textmessage = str_replace(substr($textmessage, strpos($textmessage, "<"), strpos($textmessage, ">") - strpos($textmessage, "<") + 1), "", $textmessage); + } + $textmessage = str_replace("<", "<", str_replace(">", ">", $textmessage)); $info .= "--openfirst-mail.boundry *************** *** 40,44 **** Content-Transfer-Encoding: 7bit ! $message --openfirst-mail.boundry --- 47,51 ---- Content-Transfer-Encoding: 7bit ! $textmessage --openfirst-mail.boundry |