[Openfirst-cvscommit] base/config/functions mail.php,NONE,1.1
Brought to you by:
xtimg
From: <xt...@us...> - 2003-08-16 00:48:59
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1:/tmp/cvs-serv5960 Added Files: mail.php Log Message: Add preliminary html e-mail functions (completely untested) --- NEW FILE: mail.php --- <?php /* * openFIRST.base - config/functions/mail.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@po...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Purpose: Provide mail functions capable of dealing with multi-part messages. //Produces multi-part mail messages in a manner able to be used as a drop-in replacement for mail(); function multipartmail($to, $subject, $message, $headers, $additionalparamaters) { $headers .= "Mime-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=openfirst-mail.boundry\r\n"; $info .= "--openfirst-mail.boundry Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit $message --openfirst-mail.boundry Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit"; fpassthru($header); echo("<pre>$message</pre>"); fpassthru($footer); return(mail($to, $subject, $info, $headers)); } ?> |