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()
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()