Fixed some variable issues in emailer
authorDan Fuhry <dan@enanocms.org>
Sat, 29 Jan 2011 15:31:15 -0500
changeset 1337 2ac4e08641fc
parent 1336 8694f03f3ebe
child 1338 4147bda0e93f
Fixed some variable issues in emailer
includes/email.php
--- a/includes/email.php	Sat Jan 29 15:30:59 2011 -0500
+++ b/includes/email.php	Sat Jan 29 15:31:15 2011 -0500
@@ -26,11 +26,15 @@
 
 	var $tpl_msg;
 
-	function __construct($use_smtp)
+	function __construct($use_smtp = false)
 	{
 		$this->reset();
 		$this->use_smtp = $use_smtp;
 		$this->reply_to = $this->from = '';
+		$this->addresses = array(
+				'cc' => array(),
+				'bcc' => array()
+			);
 	}
 
 	// Resets all the data (address, template file, etc etc to default
@@ -127,7 +131,7 @@
 
 		if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
 		{
-			$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim('iso-8859-1');
+			$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim('utf-8');
 			$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
 		}
 		else