protected function _error($id, $info = array())
    {
        $msg = $this->_errorCode[$id]['msg'];

        // include info to messages
        if (!empty($info)) {
            $replace = $search = array();

            foreach ($info as $key => $value) {
                $search[] = '{' . Horde_String::upper($key) . '}';
                $replace[] = $value;
            }

            $msg = str_replace($search, $replace, $msg);
        }

        throw new Horde_Mail_Exception($msg, $this->_errorCode[$id]['code']);
    }