示例#1
0
 async def handle_USER(self, server, session, username):
     session.db = DaoUser()
     session.user = POP3Model(dao_user=session.db).confirm_user(username)
     return f'+OK ({server.hostname}): {username}'
示例#2
0
 async def handle_TOP(self, server, session, which, top):
     return POP3Model().get_mail_body(session.user, which, top)
示例#3
0
 async def handle_QUIT(self, server, session):
     return POP3Model().del_mail(session)
示例#4
0
 async def handle_RETR(self, server, session, which):
     return POP3Model().get_mail_body(session.user, which)
示例#5
0
 async def handle_LIST(self, server, session, which):
     return POP3Model().get_mail_list(session.user, which)
示例#6
0
 async def handle_UIDL(self, server, session, which):
     return POP3Model().get_mail_uidl(session.user, which)
示例#7
0
 async def handle_STAT(self, server, session):
     count, size = POP3Model().get_mail_number_and_size(session.user)
     return f'+OK {count} {size}'
示例#8
0
 async def handle_PASS(self, server, session, username, password):
     POP3Model().login(session.user, password)
     return f'+OK welcome {username}'