function setText($text = '') { if ($this->charset != "utf-8") { parent::setText(encodeString($text, $this->charset)); } else { parent::setText($text); } }
function send($recipients, $type = 'mail') { global $prefs; global $logslib; include_once 'lib/logs/logslib.php'; $result = parent::send($recipients, $type); $title = $result ? 'mail' : 'mail error'; if (!$result || $prefs['log_mail']) { foreach ($recipients as $u) { $logslib->add_log($title, $u . '/' . $this->headers['Subject']); } } return $result; }