Fixing some bugs in the mail framework due to mistyped variable capitalization and...
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 22 Aug 2007 08:07:11 +0000 (01:07 -0700)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 22 Aug 2007 08:07:11 +0000 (01:07 -0700)
* Mail.php:
(BSMail::send)

Mail.php

index b567b546e44797446d486554381c65379c656535..27190bc96a28fa7f8779a8a3eb9b0290488b29a7 100644 (file)
--- a/Mail.php
+++ b/Mail.php
@@ -217,13 +217,13 @@ class BSMail
                }
                
                // sanitize the from name
-               $fromname = $this->_fetchFirstLine($this->fromname);
-               $fromname = ($fromname == '' ? $from : trim($this->registry->unsanitize($fromname)));
-               $fromname = $this->_encodeHeaderValue($this->fromname);
+               $fromName = $this->_fetchFirstLine($this->fromName);
+               $fromName = ($fromName == '' ? $from : trim($input->unsanitize($fromName)));
+               $fromName = $this->_encodeHeaderValue($this->fromName);
                
                // sanitize the subject
                $subject = $this->_fetchFirstLine($this->subject);
-               $subject = trim($unsanitize($subject));
+               $subject = trim($input->unsanitize($subject));
                if (empty($subject))
                {
                        throw new Exception('You need to specify a subject for the message');
@@ -241,7 +241,7 @@ class BSMail
                $headers = BSFunctions::ConvertLineBreaks($this->headers, $this->delim);
                $headers .= ((!preg_match("#{$this->delim}$#", $headers) AND $headers != '') ? "\n" : '') . "From: \"{$fromName}\" <{$from}>" . $this->delim;
                $headers .= "Return-Path: {$from}" . $this->delim;
-               $headers .= "X-Mailer: ISSO Mail Framework \$Revision$" . $this->delim;
+               $headers .= "X-Mailer: ISSO Mail Framework" . $this->delim;
                $headers .= "MIME-Version: 1.0" . $this->delim;
                
                // see if we need to use mime/multipart
@@ -256,7 +256,7 @@ class BSMail
                        $body = "--$boundary" . $this->delim;
                        $body .= "Content-Type: text/plain; charset=\"" . $this->charset . "\"" . $this->delim;
                        $body .= "Content-Transfer-Encoding: 8bit" . $this->delim . $this->delim;
-                       $body .= $bodytext . $this->delim;
+                       $body .= $bodyText . $this->delim;
                        
                        // add some space between the parts
                        $body .= $this->delim . $this->delim . $this->delim;
@@ -266,13 +266,13 @@ class BSMail
                        $body .= "Content-Type: text/html; charset=\"" . $this->charset . "\"" . $this->delim;
                        $body .= "Content-Transfer-Encoding: 8bit" . $this->delim;
                        $body .= "Content-Disposition: inline" . $this->delim . $this->delim;
-                       $body .= $bodyhtml . $this->delim;
+                       $body .= $bodyHtml . $this->delim;
                        $body .= "--$boundary--";
                }
                else
                {
                        $headers .= "Content-Type: text/plain; charset=\"" . $this->charset . "\"" . $this->delim;
-                       $body = $bodytext;
+                       $body = $bodyText;
                }
                $headers .= "Content-Transfer-Encoding: 8bit" . $this->delim;