server.quit() app = Flask(__name__) app.config['MAIL_SERVER'] = 'smtp.qq.com' app.config['MAIL_PORT'] = 465 app.config['MAIL_USE_SSL'] = True app.config['MAIL_USE_TLS'] = False app.config['MAIL_USERNAME'] = '******' app.config['MAIL_PASSWORD'] = '******' mail = Mail(app) addNew() ham, spam = joint() focusname = getFocusname() db = DBaction.DBac() db.__init__() #判断是否有特别关注来信 def judgeFocusname(): a = 'b' for eachHam in ham: if (eachHam['from'] in focusname): a = "a" return a
def showhams(): Ham, Spam = joint() hams = json.dumps(Ham) return hams
def deletemail(): delID = request.args['Id'] db.delete("Emails", "ID", delID) ham, spam = joint() hams = json.dumps(ham) return hams
def showspams(): ham, Spam = joint() spams = json.dumps(Spam) return spams