public function compileHeaders()
    {
        if (count($this->attachement) > 0) {
            $this->headers[] = "Content-type: multipart/mixed; boundary=\"{$this->boundary}\"" . self::END;

            foreach ($this->attachement as $file) {
                $filename = basename($file);
                $this->headers[] = "--" . $this->boundary;
                $this->headers[] = "Content-Type: application/octet-stream; name=\"{$filename}\"";
                $this->headers[] = "Content-Transfer-Encoding: base64";
                $this->headers[] = "Content-Disposition: attachment" . self::END;
                $this->headers[] = chunk_split(base64_encode(file_get_contents($file)));
            }

            $this->headers[] = "--" . $this->boundary;
        }

        return implode(self::END, $this->headers).self::END;
    }
public function compileHeaders()
    {
        if (count($this->attachement) > 0) {
            $this->headers[] = "Content-type: multipart/mixed; boundary=\"{$this->boundary}\"" . self::END;

            foreach ($this->attachement as $file) {
                $filename = basename($file);
                $this->headers[] = "--" . $this->boundary;
                $this->headers[] = "Content-Type: application/octet-stream; name=\"{$filename}\"";
                $this->headers[] = "Content-Transfer-Encoding: base64";
                $this->headers[] = "Content-Disposition: attachment" . self::END;
                $this->headers[] = chunk_split(base64_encode(file_get_contents($file)));
            }

            $this->headers[] = "--" . $this->boundary;
        }

        return implode(self::END, $this->headers).self::END;
    }
public function compileHeaders ( ) { if ( count ( $ this -> attachement ) > 0 ) { $ this -> headers [ ] = "Content-type: multipart/mixed; boundary=\"{$this->boundary}\"" . self :: END ; foreach ( $ this -> attachement as $ file ) { $ filename = basename ( $ file ) ; $ this -> headers [ ] = "--" . $ this -> boundary ; $ this -> headers [ ] = "Content-Type: application/octet-stream; name=\"{$filename}\"" ; $ this -> headers [ ] = "Content-Transfer-Encoding: base64" ; $ this -> headers [ ] = "Content-Disposition: attachment" . self :: END ; $ this -> headers [ ] = chunk_split ( base64_encode ( file_get_contents ( $ file ) ) ) ; } $ this -> headers [ ] = "--" . $ this -> boundary ; } return implode ( self :: END , $ this -> headers ) . self :: END ; }
Compile the mail header

@return string
Compile the mail header