added check for session context in mail action