Hi all,

I'm writing a plugin that uses the message_part_get hook. The basics of what I'm doing is based on certain mimetypes, I want to have a special viewer for certain attachments. Based on the attachment, I write some info to the Roundcube temp directory. When I try to display that in a viewer tab via this method:

        if (!$args['download'] && $args['mimetype'] && empty($_GET['_load']) && in_array($args['mimetype'], $this->xdm_mimetypes)) {
            header('Location: ' . $this->abs_url($pathtomytemphtml));
            $args['abort'] = true; 
        }

I'm getting Forbidden - You don't have permission to access /mail/temp/somedir/index.html on this server.

Note: if I do this same thing and put the location to a dummy index.html that is under my plugin directory:

.../plugins/myplugin/index.html

Roundcube displays the content inlined.

For privacy, I can't put the files in the "myplugin" directory.

How can I get this inlined correctly using this method? Any help is appreciated. 

Thank you,


--
Marcus Malcom
Mirth Corporation
Senior Software Engineer

CONFIDENTIALITY NOTICE: The information contained in this electronic transmission may be confidential. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by email reply and then erase it from your computer system.