How you do it depends on where you're adding the button: whether in the core client code, or via a zimlet. Either way, you'd probably create an operation for it - an operation in the ZCS client represents an action the user can take, and is represented visually as either a button or a menu item.
If you do it in the core client code, you would do something like this (assuming you're reasonably current):
- ZmMailApp: create an operation for it via ZmOperation.registerOp
- ZmComposeController: add it to the toolbar (_initializeToolBar)
- ZmComposeController: add a listener for it (constructor)
- ZmComposeController: write the listener, have it do what you want
Via a zimlet (this all goes in your zimlet's .
js file):
- create an operation for it via ZmOperation.registerOp
- get a reference to the compose controller, add operation to its toolbar
- add a listener
- write the listener
-Conrad