Fixing a call to undefined function error for BSFunctions::Rand() in BSMail::send()
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 6 Jul 2008 12:52:21 +0000 (08:52 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 6 Jul 2008 12:52:21 +0000 (08:52 -0400)
* Mail.php:
(BSMail::send): Require Functions.php and then call ::random() instead of ::Rand()

CHANGES
Mail.php

diff --git a/CHANGES b/CHANGES
index edc044ab2861732c896890cacce89e72e368f94d..ff5fa24e8124799b6d2974654cfc5302faf1584d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3.1.1
+===================
+- Fixed: BSMail::send() would fail if sending a HTML/multipart email because it would call BSFunctions::Rand()
+
 3.1.0
 ===================
 - Change: BSPrinterElementTable:__construct() can now take straight strings and convert them into BSPrinterElementLabel's
index 05db039077975251ec66f9ebaa48b8943c9178b8..323d3c3a000b468d045c23295081347897b58e64 100644 (file)
--- a/Mail.php
+++ b/Mail.php
@@ -242,7 +242,8 @@ class BSMail
                // see if we need to use mime/multipart
                if ($sendhtml && !empty($bodyhtml) == true)
                {
-                       $boundary = 'ISSO-MULTIPART-' . BSFunctions::Rand(10);
+                       require_once ISSO . '/Functions.php';
+                       $boundary = 'ISSO-MULTIPART-' . BSFunctions::random(10);
                        $headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"" . $this->delim;
                        
                        $bodyHtml = BSFunctions::convert_line_breaks($this->bodyHtml, $this->delim);