Beispiel #1
0
 function BuildMail()
 {
     // build the headers
     $this->headers = "";
     //	$this->xheaders['To'] = implode( ", ", $this->sendto );
     if (count($this->acc) > 0) {
         $this->xheaders['CC'] = implode(", ", $this->acc);
     }
     if (count($this->abcc) > 0) {
         $this->xheaders['BCC'] = implode(", ", $this->abcc);
     }
     if ($this->receipt) {
         if (isset($this->xheaders["Reply-To"])) {
             $this->xheaders["Disposition-Notification-To"] = $this->xheaders["Reply-To"];
         } else {
             $this->xheaders["Disposition-Notification-To"] = $this->xheaders['From'];
         }
     }
     if ($this->charset != "") {
         $this->xheaders["Mime-Version"] = "1.0";
         $this->xheaders["Content-Type"] = "text/html; charset={$this->charset}";
         $this->xheaders["Content-Transfer-Encoding"] = 'quoted-printable';
     }
     $this->xheaders["X-Mailer"] = "Php/libMailv1.3";
     // include attached files
     if (count($this->aattach) > 0) {
         $this->_build_attachement();
     } else {
         $this->fullBody = div::quoted_printable($this->body);
     }
     reset($this->xheaders);
     while (list($hdr, $value) = each($this->xheaders)) {
         if ($hdr != "Subject") {
             $this->headers .= "{$hdr}: {$value}\n";
         }
     }
 }