function &_addAttachmentPart(&$obj, $value)
    {
        $params['eol']          = $this->_build_params['eol'];
        $params['filename']     = $value['name'];
        $params['encoding']     = $value['encoding'];
        $params['content_type'] = $value['c_type'];
        $params['body_file']    = $value['body_file'];
        $params['disposition']  = isset($value['disposition']) ? 
                                  $value['disposition'] : 'attachment';

        // content charset
        if (!empty($value['charset'])) {
            $params['charset'] = $value['charset'];
        }
        // headers charset (filename, description)
        if (!empty($value['headers_charset'])) {
            $params['headers_charset'] = $value['headers_charset'];
        }
        if (!empty($value['language'])) {
            $params['language'] = $value['language'];
        }
        if (!empty($value['location'])) {
            $params['location'] = $value['location'];
        }
        if (!empty($value['name_encoding'])) {
            $params['name_encoding'] = $value['name_encoding'];
        }
        if (!empty($value['filename_encoding'])) {
            $params['filename_encoding'] = $value['filename_encoding'];
        }
        if (!empty($value['description'])) {
            $params['description'] = $value['description'];
        }
        if (is_array($value['add_headers'])) {
            $params['headers'] = $value['add_headers'];
        }

        $ret = $obj->addSubpart($value['body'], $params);
        return $ret;
    }
function &_addAttachmentPart(&$obj, $value)
    {
        $params['eol']          = $this->_build_params['eol'];
        $params['filename']     = $value['name'];
        $params['encoding']     = $value['encoding'];
        $params['content_type'] = $value['c_type'];
        $params['body_file']    = $value['body_file'];
        $params['disposition']  = isset($value['disposition']) ? 
                                  $value['disposition'] : 'attachment';

        // content charset
        if (!empty($value['charset'])) {
            $params['charset'] = $value['charset'];
        }
        // headers charset (filename, description)
        if (!empty($value['headers_charset'])) {
            $params['headers_charset'] = $value['headers_charset'];
        }
        if (!empty($value['language'])) {
            $params['language'] = $value['language'];
        }
        if (!empty($value['location'])) {
            $params['location'] = $value['location'];
        }
        if (!empty($value['name_encoding'])) {
            $params['name_encoding'] = $value['name_encoding'];
        }
        if (!empty($value['filename_encoding'])) {
            $params['filename_encoding'] = $value['filename_encoding'];
        }
        if (!empty($value['description'])) {
            $params['description'] = $value['description'];
        }
        if (is_array($value['add_headers'])) {
            $params['headers'] = $value['add_headers'];
        }

        $ret = $obj->addSubpart($value['body'], $params);
        return $ret;
    }
function & _addAttachmentPart ( & $ obj , $ value ) { $ params [ 'eol' ] = $ this -> _build_params [ 'eol' ] ; $ params [ 'filename' ] = $ value [ 'name' ] ; $ params [ 'encoding' ] = $ value [ 'encoding' ] ; $ params [ 'content_type' ] = $ value [ 'c_type' ] ; $ params [ 'body_file' ] = $ value [ 'body_file' ] ; $ params [ 'disposition' ] = isset ( $ value [ 'disposition' ] ) ? $ value [ 'disposition' ] : 'attachment' ; // content charset if ( ! empty ( $ value [ 'charset' ] ) ) { $ params [ 'charset' ] = $ value [ 'charset' ] ; } // headers charset (filename, description) if ( ! empty ( $ value [ 'headers_charset' ] ) ) { $ params [ 'headers_charset' ] = $ value [ 'headers_charset' ] ; } if ( ! empty ( $ value [ 'language' ] ) ) { $ params [ 'language' ] = $ value [ 'language' ] ; } if ( ! empty ( $ value [ 'location' ] ) ) { $ params [ 'location' ] = $ value [ 'location' ] ; } if ( ! empty ( $ value [ 'name_encoding' ] ) ) { $ params [ 'name_encoding' ] = $ value [ 'name_encoding' ] ; } if ( ! empty ( $ value [ 'filename_encoding' ] ) ) { $ params [ 'filename_encoding' ] = $ value [ 'filename_encoding' ] ; } if ( ! empty ( $ value [ 'description' ] ) ) { $ params [ 'description' ] = $ value [ 'description' ] ; } if ( is_array ( $ value [ 'add_headers' ] ) ) { $ params [ 'headers' ] = $ value [ 'add_headers' ] ; } $ ret = $ obj -> addSubpart ( $ value [ 'body' ] , $ params ) ; return $ ret ; }
Adds an attachment subpart to a mimePart object
and returns it during the build process.

@param object &$obj  The mimePart to add the image to
@param array  $value The attachment information

@return object       The image mimePart object
@access private
Adds an attachment subpart to a mimePart object and returns it during the build process .