def post(self): StaticData.init(self) self.title = "Mail Sending" contact_list = self.get_argument('contact', default='').split(',') content = self.get_argument('content', default='') sendmail(contact_list, content) self.write('<script language="javascript">alert("发送成功");self.location="/admin";</script>') self.session.close()
def get(self): StaticData.init(self) self.title = "Mail Sending" self.render('admin_mail.html') self.session.close()