Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: wladik on September 04, 2009, 04:13:58 PM

Title: imap_init hook and fetch_headers
Post by: wladik on September 04, 2009, 04:13:58 PM
Hello there,

I would like to ask a simple question, but i am not able to find out any solution.

I want to fetch additional headers about message, so I ve added that header as return value from this hook in this way

class myplugin extends rcube_plugin
{

function init()
{
...
$this->add_hook('imap_init', array($this, 'imap_init'));
...
}

function imap_init($p)
{
$rcmail = rcmail::get_instance();
$p['fetch_headers'] = trim($p['fetch_headers'].' ' . strtoupper('X-Virus-Scanned'));
return $p;
        }


so after i need use hook message_headers_output i am able to use new header Recieved, but here is my problem.. If in the message headers are two X-Virus-Scanned headers i'll get only one of them in this way, is any chance to get all X-Virus-Scanned headers?

thanks for reply

Vladimir