[cvs] / gkbweb / htdocs / shared / inc / email.inc  

cvs: gkbweb/htdocs/shared/inc/email.inc

File: [cvs] / gkbweb / htdocs / shared / inc / email.inc (download)
Revision: 1.1, Wed Jul 21 17:43:42 2004 UTC (8 years, 11 months ago) by tmcnulty
Branch point for: MAIN, ppckernel
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
(Powered by ViewCVS)

ViewCVS and CVS Help