From f1ecb7ca4a5570261cce3fed2c44bb616baf2a1c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 22 Aug 2007 01:07:11 -0700 Subject: [PATCH] Fixing some bugs in the mail framework due to mistyped variable capitalization and a call to $this->registry->unsanitize() * Mail.php: (BSMail::send) --- Mail.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Mail.php b/Mail.php index b567b54..27190bc 100644 --- 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; -- 2.43.5