Update of /cvsroot/openfirst/base/config/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv10806
Modified Files:
mail.php
Log Message:
Actually test this somewhat and remove the obvious glaring errors.
Index: mail.php
===================================================================
RCS file: /cvsroot/openfirst/base/config/functions/mail.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mail.php 15 Aug 2003 18:18:08 -0000 1.1
--- mail.php 17 Aug 2003 16:22:44 -0000 1.2
***************
*** 28,33 ****
// 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";
--- 28,36 ----
// 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 = "openFIRST Mailing", $message = "No message given.", $headers = "", $additionalparamaters = "") {
! global $header;
! global $footer;
!
$headers .= "Mime-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/alternative; boundary=openfirst-mail.boundry\r\n";
***************
*** 42,48 ****
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));
}
--- 45,60 ----
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit";
!
! $fle = fopen($header, "r");
! while(!feof($fle)) {
! $fheader .= fgets($fle);
! }
! fclose($fle);
! $fle = fopen($footer, "r");
! while(!feof($fle)) {
! $ffooter .= fgets($fle);
! }
! fclose($fle);
! $info .= ("$fheader<pre>$message</pre>$ffooter");
return(mail($to, $subject, $info, $headers));
}
|