Initial revision
<?php
if (!isset($xorsis_include_email)) {
$xorsis_include_email=1;
class email {
var $from, $to, $subject, $message;
function email($to, $from, $subject) {
//$this->fp = popen("/usr/lib/sendmail -t -oi","w");
$this->to = $to;
$this->from = $from;
$this->subject = $subject;
/*
$this->writeline("To: $to");
$this->writeline("From: $from");
$this->writeline("Subject: $subject");
if (strpos($to, "xorsis.com") === false)
$this->writeline("Bcc: webmaster@xorsis.com");
$this->writeline("");*/
}
function write($data) {
// fwrite($this->fp,word_wrap($data,80));
$this->message .= word_wrap($data,80);
}
function writeline($data) {
$this->write($data);
}
function send() {
// pclose($this->fp);
$headers = "From: ".$this->from."\r\nReply-To: ".$this->from."\r\nX-Mailer: PHP/" . phpversion();
mail($this->to, $this->subject, $this->message, $headers, "-f".$this->from);
}
}
}
?>
|
Tobias McNulty Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |