Fixing an undefined variable notice and improving the debug output
Fixing an undefined variable notice and improving the debug output
* Mail.php:
(BSMail::send): Change the $sendHtml param to $sendhtml and mark the BSApp::debug messages with the class name
diff --git a/CHANGES b/CHANGES
index ff5fa24..c16ddd3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
3.1.1
===================
- Fixed: BSMail::send() would fail if sending a HTML/multipart email because it would call BSFunctions::Rand()
+- Fixed: BSMail::send() would not send HTML emails due to a caps typo in the $sendHtml param
+- Change: BSMail::send() now labels iteslf in its BSApp::debug() messages
3.1.0
===================
diff --git a/Mail.php b/Mail.php
index 323d3c3..8e6a646 100644
--- a/Mail.php
+++ b/Mail.php
@@ -181,7 +181,7 @@ class BSMail
*
* @return bool Status of the message
*/
- public function send($address, $name = null, $sendHtml = false)
+ public function send($address, $name = null, $sendhtml = false)
{
if (empty($address))
{
@@ -192,7 +192,7 @@ class BSMail
// TODO - add support for SMTP
if (!@ini_get('sendmail_path'))
{
- BSApp::debug("email: no sendmail -> not sending");
+ BSApp::debug("BSMail: no sendmail -> not sending");
return false;
}
@@ -277,11 +277,11 @@ class BSMail
// attempt to send the mail!
if (mail($tostring, $subject, $body, $headers, "-f {$from}"))
{
- BSApp::debug("email: sent to $address");
+ BSApp::debug("BSMail: sent to $address");
}
else
{
- BSApp::debug("email: error sending to $address");
+ BSApp::debug("BSMail: error sending to $address");
}
}