<?php
 require_once(dirname(__FILE__).'/../phpmailer/class.phpmailer.php'); class Mailer extends PHPMailer { public $to = array(); function init() { $this->CharSet = 'utf-8'; $this->IsHTML(true); $this->loadConf('mailer'); $this->SMTPDebug = false; } function loadConf($v) { $this->Conf = $this->Mizu->Conf[$v]['attr']; if($this->Conf['smtp']) { $this->IsSMTP(); } if(is_array($this->Conf)) { foreach($this->Conf as $k => $v) { if($v=="true") { $v=true; } if($k=='smtp') continue; $this->{$k} = $v; } } } function get($k) { return $this->{$k}; } function Send() { $this->Mizu->_Conf->execHook('Mailer.Send.init',$this); $R = parent::Send(); if(!$R AND $this->Mizu->devMode) { return true; } return $R; } }