Hello,
I've added a GUI element to Roundcube Mail which executes a php function using rcmail.http_post
js:
rcmail.addEventListener('init', function(evt) {
$('#messagetoolbar').append('...
});
php
$this->register_action('plugin.test', array($this, 'test'));
The php function sets a Flag. This flag should be evaluated when the hook 'message_outgoing_headers' is executed.
However, I was not able to provide persistent data to the message_outgoing_headers hook. I've tried to use class variables but they only remain between hooks, not between a registered action and a hook. The only think that worked so far was actually writing the flag to the hard drive which is considerarbly the worst solution.
What is the proper way to do that? Basically I need a button wich changes data when sending a message.
Best regards