sp; $this->elog(fgets($this->connection, 1024));
return 1;
}
function send()
{
if ($this->connection)
{
fputs($this->connection, "QUIT\r\n");
fclose($this->connection);
$this->connection=0;
}
}
function close()
{
$this->send();
}
function elog($text, $mode=0)
{
if (!$this->do_log) return;
// open file
if (!$this->elog_fp)
{
if (!($this->elog_fp=fopen($this->log_file, 'a'))) return;
fwrite($this->elog_fp, "\n-------------------------------------------\n");
fwrite($this->elog_fp, " Sent " . date("Y-m-d H:i:s") . "\n");
fwrite($this->elog_fp, "-------------------------------------------\n");
}
// write to log
if (!$mode)
{
fwrite($this->elog_fp, " $text\n");
}
else
{
fwrite($this->elog_fp, "$text\n");
}
}
}
?>
c_mail.php
<?php
/* 邮件发送类 */
require_once dirname(__FILE__)."/c_smtp_client.php";
static $c_smtp_client;
&nb
return 1;
}
function send()
{
if ($this->connection)
{
fputs($this->connection, "QUIT\r\n");
fclose($this->connection);
$this->connection=0;
}
}
function close()
{
$this->send();
}
function elog($text, $mode=0)
{
if (!$this->do_log) return;
// open file
if (!$this->elog_fp)
{
if (!($this->elog_fp=fopen($this->log_file, 'a'))) return;
fwrite($this->elog_fp, "\n-------------------------------------------\n");
fwrite($this->elog_fp, " Sent " . date("Y-m-d H:i:s") . "\n");
fwrite($this->elog_fp, "-------------------------------------------\n");
}
// write to log
if (!$mode)
{
fwrite($this->elog_fp, " $text\n");
}
else
{
fwrite($this->elog_fp, "$text\n");
}
}
}
?>
c_mail.php
<?php
/* 邮件发送类 */
require_once dirname(__FILE__)."/c_smtp_client.php";
static $c_smtp_client;
&nb
| 对此文章发表了评论 |
