Events that need to be reported to the user can use Horde::raiseMessage()
<?php case MESSAGE_MISSING: Horde::raiseMessage(_("There was an error viewing the requested message."), HORDE_ERROR); break; ?>