Author Topic: Create hook  (Read 2585 times)

Offline soromir

  • Jr. Member
  • **
  • Posts: 15
Create hook
« on: June 23, 2017, 08:07:59 AM »
Hi, Who can tell how to catch the move message, to implement the hook

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Create hook
« Reply #1 on: June 24, 2017, 11:50:01 AM »
one way is from the javascript events there are before<command> and after<command> events. so something like:
Code: [Select]
rcmail.addEventListener('beformove', function() { /* do something */ });
If you want a more detailed example look at the JS in the vcard_attachments plugin shipped with roundcube.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline soromir

  • Jr. Member
  • **
  • Posts: 15
Re: Create hook
« Reply #2 on: June 29, 2017, 10:04:17 AM »
I need to catch a moment in PHP, after $this->rc->storage->move_message()