<?php
 require_once(dirname(__FILE__).'/../phpmailer/class.phpmailer.php'); class Mailer extends PHPMailer { 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 Send() { $R = parent::Send(); if(!$R AND $this->Mizu->devMode) { return true; } return $R; } }