I've been searching the archive here and other plugins for help on how to fetch custom headers in the message list view, and I must have misunderstood something, because I can't read it (only in the message view). What I've been doing is:
$this->add_hook('storage_init', array($this, 'storage_init'));
I use fetch headers to retrieve the 'checking' header
function storage_init($p) { $p['fetch_headers'] = trim($p['fetch_headers'].'Checking'); return $p; }
If I now print all the data coming from the mail, this header isn't shown, only the usual headers (from, cc, cco).
Any help on what i'm missing here?
-- View this message in context: http://roundcube-webmail.10982.n7.nabble.com/Fetching-custom-message-headers... Sent from the Development mailing list archive at Nabble.com.
On Wed, Oct 29, 2014 at 1:50 PM, hyukudan yotitachan@hotmail.com wrote:
I've been searching the archive here and other plugins for help on how to fetch custom headers in the message list view, and I must have misunderstood something, because I can't read it (only in the message view). What I've been doing is:
- I add a hook after the plugin init function, calling storage_init
$this->add_hook('storage_init', array($this, 'storage_init'));
I use fetch headers to retrieve the 'checking' header
function storage_init($p) { $p['fetch_headers'] = trim($p['fetch_headers'].'Checking'); return $p; }
That's almost correct :-) Please note that 'fetch_headers' is a space separated list of upper-cased headers. Thus $p['fetch_headers'] =$p['fetch_headers'] . ' CHECKING'; should work.
Enable IMAP debug logging with $config['imap_debug'] = true; in config in order to verify the requests and responses to and from the imap server.
Regards, Thomas
On 10/29/2014 06:04 PM, Thomas Bruederli wrote:
Enable IMAP debug logging with $config['imap_debug'] = true; in config in order to verify the requests and responses to and from the imap server.
And disable messages_cache for testing. Headers are not fetched again if a message was already cached and you changed set of headers.
Thanks a lot to all of you! I got it working now, it seems i forgot as you said how to write the header in the fetch field... a mistake so simple I didn't see it even while looking into it over and over again.
-- View this message in context: http://roundcube-webmail.10982.n7.nabble.com/Fetching-custom-message-headers... Sent from the Development mailing list archive at Nabble.com.
You can check my listcommands plugin to see how I do it:
https://github.com/corbosman/listcommands/blob/master/listcommands.php https://github.com/corbosman/listcommands/blob/master/listcommands.php
Cor