[RCD] How to query IMAP Flag from within a plugin?
thomas at roundcube.net
Sun Aug 13 21:45:07 CEST 2017
It's probably worth to look a the thunderbird_labels plugin for
Roundcube . It uses IMAP flags to store custom labels.
Custom flags need to be supported by the IMAP server with the
PERMANENTFLAGS capability. You can check this with the following
command from within a plugin:
Then setting and unsetting those flags should be possible.
In order to check a certain flag, you have to test it in the message
object and not the IMAP storage instance in Roundcube. Do this in one
of the message hooks like message_load  or messages_list :
I hope this helps you to proceed.
On Fri, Aug 11, 2017 at 4:00 PM, Benoit Panizzon <benoit.panizzon at imp.ch> wrote:
> Well, I'm giving up.
> After consulting the PHP online manual on IMAP Flags and only finding
> functions to set and clear flags, but not to query then.
> And then after further research, stumbling over this article:
> "Actually you are not able to do so using standard imap extension as it
> is impossible to fetch custom flags using it."
> I suppose custom flags support has not been built into roundcube. If it
> is I would be glad if someone could correct me.
> Therefore I wonder, why plugins linke report_junk set the 'JUNK' flag
> if there is no way to query this flag from within roundcube.
> -Benoît Panizzon-
> I m p r o W a r e A G - Leiter Commerce Kunden
> Zurlindenstrasse 29 Tel +41 61 826 93 00
> CH-4133 Pratteln Fax +41 61 826 93 01
> Schweiz Web http://www.imp.ch
> Roundcube Development discussion mailing list
> dev at lists.roundcube.net
More information about the dev