alecpl
2009-02-08 0ea8d3a08e6055293aaa689bff6525522986e71c
program/lib/Mail/mimePart.php
@@ -185,6 +185,9 @@
   
        if (isset($contentType['type'])) {
            $headers['Content-Type'] = $contentType['type'];
       if (isset($contentType['charset'])) {
                $headers['Content-Type'] .= "; charset=\"{$contentType['charset']}\"";
            }
            if (isset($contentType['name'])) {
                $headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF;
                $headers['Content-Type'] .=
@@ -192,8 +195,6 @@
                        isset($contentType['charset']) ? $contentType['charset'] : 'US-ASCII', 
                        isset($contentType['language']) ? $contentType['language'] : NULL,
         isset($params['name-encoding']) ?  $params['name-encoding'] : NULL);
            } elseif (isset($contentType['charset'])) {
                $headers['Content-Type'] .= "; charset=\"{$contentType['charset']}\"";
            }
        }
@@ -242,7 +243,6 @@
        $encoded =& $this->_encoded;
        if (count($this->_subparts)) {
            srand((double)microtime()*1000000);
            $boundary = '=_' . md5(rand() . microtime());
            $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"';
@@ -257,8 +257,8 @@
            }
            $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF . 
                               rtrim(implode('--' . $boundary . MAIL_MIMEPART_CRLF , $subparts), MAIL_MIMEPART_CRLF) . MAIL_MIMEPART_CRLF .
                               '--' . $boundary.'--' . MAIL_MIMEPART_CRLF;
            implode('--' . $boundary . MAIL_MIMEPART_CRLF , $subparts) .
                           '--' . $boundary.'--' . MAIL_MIMEPART_CRLF;
        } else {
            $encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding);
@@ -436,7 +436,7 @@
            }
            $headCount++;
        }
        $headers = implode(MAIL_MIMEPART_CRLF, $headers) . ';';
        $headers = implode(';' . MAIL_MIMEPART_CRLF, $headers) . ';';
        return $headers;
    }