Logo Search packages:      
Sourcecode: zope-maildrophost version File versions

def MaildropHost::MaildropHost::Email::send (   self  )  [inherited]

Write myself to the file system 

Definition at line 191 of file MaildropHost.py.

00191                   :
        """ Write myself to the file system """
        temp_path = self._tempfile
        lock_path = '%s.lck' % temp_path

        lock = open(lock_path, 'w')
        lock.write('locked')
        lock.close()

        temp = open(temp_path, 'w')
        temp.write(MAIL_TEMPLATE % (self.m_to, self.m_from, self.body))
        temp.close()

        if not self._transactional:
            os.unlink(lock_path)
        else:
            self._lockfile = lock_path

        # At this point only the lockfile path is interesting, try
        # to save some memory by gutting the object
        self.m_to = self.m_from = self.body = ''


class TransactionalEmail(TransactionalMixin, Email):


Generated by  Doxygen 1.6.0   Back to index