OK. You may want to look at the JSP pages and the taglib that implement the HTML "lite" client for a template -- the JSP files are found in the source tree under ZimbraWebClient/WebRoot/h, while the taglib they use to communicate with the server is found in ZimbraTagLib/src/java/com/zimbra/cs/taglib. You'll probably want to be using ZMailbox in the same way the taglib does.
Note that non-draft messages are immutable in Zimbra. So you're going to have to fetch the message from the store, modify it on your end, put the modified messasge back to the store as a new message, and delete the old message. |