Exemple #1
0
 def insert_message(self, msg, mailid, recipient):
     # Create the Maildir if necessary.
     self._create()
     # X-TMDA-Recipient is used by release_pending()
     del msg['X-TMDA-Recipient']
     msg['X-TMDA-Recipient'] = recipient
     # Write message
     time, pid = mailid.split('.')
     self.__deliver_maildir(Util.msg_as_string(msg), time, pid,
                            Defaults.PENDING_DIR)
     del msg['X-TMDA-Recipient']
Exemple #2
0
 def insert_message(self, msg, mailid, recipient):
     fname = mailid + ".msg"
     # Create ~/.tmda/ and friends if necessary.
     self._create()
     # X-TMDA-Recipient is used by release_pending()
     del msg['X-TMDA-Recipient']
     msg['X-TMDA-Recipient'] = recipient
     # Write ~/.tmda/pending/MAILID.msg
     fcontents = Util.msg_as_string(msg)
     fpath = os.path.join(Defaults.PENDING_DIR, fname)
     Util.writefile(fcontents, fpath)
     del msg['X-TMDA-Recipient']
 def insert_message(self, msg, mailid, recipient):
     fname = mailid + ".msg"
     # Create ~/.tmda/ and friends if necessary.
     self._create()
     # X-TMDA-Recipient is used by release_pending()
     del msg['X-TMDA-Recipient']
     msg['X-TMDA-Recipient'] = recipient
     # Write ~/.tmda/pending/MAILID.msg
     fcontents = Util.msg_as_string(msg)
     fpath = os.path.join(Defaults.PENDING_DIR, fname)
     Util.writefile(fcontents, fpath)
     del msg['X-TMDA-Recipient']