| | |
| | | |
| | | 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'] .= |
| | |
| | | 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']}\""; |
| | | } |
| | | } |
| | | |
| | |
| | | $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 . '"'; |
| | | |
| | |
| | | } |
| | | |
| | | $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); |
| | |
| | | } |
| | | $headCount++; |
| | | } |
| | | $headers = implode(MAIL_MIMEPART_CRLF, $headers) . ';'; |
| | | $headers = implode(';' . MAIL_MIMEPART_CRLF, $headers) . ';'; |
| | | return $headers; |
| | | } |
| | | |