@auth
    def _PUT(self, *param, **params):
        if not validates_mail(self):
            return web.badrequest(self.view.alert)

        try:
            conf = env.get('KARESANSUI_CONF')
            _K2V = K2V(conf)
            config = _K2V.read()
            config['application.mail.server'] = self.input.server
            config['application.mail.port'] = self.input.port
            config['application.mail.email'] = self.input.email
            _K2V.write(config)
            self.view.mail = get_view_mail(config)
            return True

        except __HOLE__, kge:
            self.logger.debug(kge)
            raise KaresansuiGadgetException, kge
dataset/ETHPy150Open karesansui/karesansui/karesansui/gadget/mail.py/Mail._PUT