/* * class mime_mail * original implementation by sascha schumann <[email protected]> * modified by tobias ratschiller <[email protected]>: * - general code clean-up * - separate body- and from-property * - killed some mostly un-necessary stuff */
class mime_mail { var $parts; var $to; var $from; var $headers; var $subject; var $body;
/* * void send() * send the mail (last class-function to be called) */ function send() { $mime = ""; if (!empty($this->from)) $mime .= "from: ".$this->from."/n"; if (!empty($this->headers)) $mime .= $this->headers."/n";
if (!empty($this->body)) $this->add_attachment($this->body, "", "text/plain"); $mime .= "mime-version: 1.0/n".$this->build_multipart(); mail($this->to, $this->subject, "", $mime); } }; // end of class