read mail after request

This commit is contained in:
2024-03-21 14:55:17 +01:00
parent 67b6a181cb
commit dead188a69
9 changed files with 471 additions and 6 deletions
+36
View File
@@ -0,0 +1,36 @@
class MailAddress:
def __init__(self, mail, password):
self.mail = mail
self.password = password
def __repr__(self):
return "邮箱:{}, 密码:{}".format(self.mail, self.password)
def to_firestore_dict(self):
dest = {
u'mail': self.mail,
u'password': self.password
}
return dest
@staticmethod
def from_firestore_dict(source):
password = source['password']
mail = source['mail']
return MailAddress(mail=mail, password=password)
class MailPojo:
from_address: str
to_address: str
body: str
subject: str
mail_address: str = ""
isImapClient = False
def __init__(self, from_address, body, subject):
self.body = body
self.subject = subject
self.from_address = from_address
self.isImapClient = False
self.to_address = ""