Esempio n. 1
0
    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

Esempio n. 2
0
def showhams():
    Ham, Spam = joint()
    hams = json.dumps(Ham)
    return hams
Esempio n. 3
0
def deletemail():
    delID = request.args['Id']
    db.delete("Emails", "ID", delID)
    ham, spam = joint()
    hams = json.dumps(ham)
    return hams
Esempio n. 4
0
def showspams():
    ham, Spam = joint()
    spams = json.dumps(Spam)
    return spams