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); } } } ?>