示例#1
0
文件: utils.py 项目: henca887/wappy
def store_local_message_body(account, folder_path, uid, text):
    """Store message body in local database."""
    folder = account.folders.get(path=folder_path)
    header = folder.headers.get(uid=uid)
    body = MailBody()
    body.header = header
    body.text = text
    body.save()
示例#2
0
文件: pm.py 项目: henca887/wappy
 def _put_message_into_folder(self, folder, recipient, subject, text):
     header = MailHeader()
     header.folder = folder
     header.uid = self._next_uid(folder)
     header.subject = subject
     header.flags = ''
     header.timestamp = time()
     header.save()
     body = MailBody()
     body.header = header
     body.text = text
     body.save()