/*=====================================================================*\
|| ###################################################################
|| # Blue Static ISSO Framework
-|| # Copyright (c)2005-2008 Blue Static
+|| # Copyright (c)2005-2009 Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
* sends mail with full email headers.
*
* @author Blue Static
- * @copyright Copyright (c)2005 - 2008, Blue Static
+ * @copyright Copyright (c)2005 - 2009, Blue Static
* @package ISSO
*
*/
*
* @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))
{
// 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;
}
// 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);
// 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");
}
}