function customError($errno, $errstr)
{
$this->_set_error_message('smtp stream fwrite error '.mb_convert_encoding ($errstr, 'UTF-8', "ASCII, GB2312, GBK"));
}
// --------------------------------------------------------------------
/**
* Send SMTP data
*
* @access private
* @return bool
*/
private function _send_data($data)
{
set_error_handler(array($this,'customError'));//把错误放入debug
$writed = fwrite($this->_smtp_connect, $data . $this->newline);
restore_error_handler();//还原错误处理
if ( ! $writed)
{
$this->_set_error_message('email_smtp_data_failure', $data);
return FALSE;
}
else
{
return TRUE;
}
}
原来的,直接输出到屏幕,现在改为放入debug数组中