I'm trying to create a new integrated Zimlet that will appear in the mail-list's context menu, along with "mark as read/undead" and so on.

Right now, I'm able to get the email's data and work with it if there's an email already selected and loaded. How can I set it up to work on an email that's merely right-clicked on but not selected, the way 'mark as read' does?