Did I find the right examples for you? yes no

All Samples(14)  |  Call(7)  |  Derive(0)  |  Import(7)
A mail delivery utility that puts all messages into a queue in the
filesystem.

Messages will be delivered asynchronously by a separate component.

src/p/r/Products.MailHost-2.13.1/src/Products/MailHost/MailHost.py   Products.MailHost(Download)
from zope.sendmail.mailer import SMTPMailer
from zope.sendmail.maildir import Maildir
from zope.sendmail.delivery import DirectMailDelivery, QueuedMailDelivery, \
                            QueueProcessorThread
 
                # Start queue processor thread, if necessary
                self._startQueueProcessorThread()
                delivery = QueuedMailDelivery(self.smtp_queue_directory)
            else:
                delivery = DirectMailDelivery(self._makeMailer())

src/c/o/collective.overridemailrecipients-1.0.2/src/collective/overridemailrecipients/patches.py   collective.overridemailrecipients(Download)
from email import message_from_string
from zope.component import getUtility
from zope.sendmail.delivery import DirectMailDelivery, QueuedMailDelivery
from plone.registry.interfaces import IRegistry
 
            # Start queue processor thread, if necessary
            self._startQueueProcessorThread()
            delivery = QueuedMailDelivery(self.smtp_queue_directory)
        else:
            delivery = DirectMailDelivery(self._makeMailer())

src/z/o/zope.sendmail-4.0.0a2/src/zope/sendmail/zcml.py   zope.sendmail(Download)
from zope.schema import TextLine, ASCIILine, Int, Bool
 
from zope.sendmail.delivery import QueuedMailDelivery, DirectMailDelivery
from zope.sendmail.interfaces import IMailer, IMailDelivery
from zope.sendmail.mailer import SMTPMailer
    def createQueuedDelivery():
        delivery = QueuedMailDelivery(queuePath)
        if permission is not None:
            delivery = _assertPermission(permission, IMailDelivery, delivery)
 

src/z/o/zopyx.smartprintng.server-1.1.2/zopyx/smartprintng/server/mail_util.py   zopyx.smartprintng.server(Download)
from ConfigParser import ConfigParser
from zope.sendmail.mailer import SMTPMailer
from zope.sendmail.delivery import QueuedMailDelivery, QueueProcessorThread
import transaction
from logger import LOG
 
    config = getMailConfiguration()
    delivery = QueuedMailDelivery(config['maildir'])
    delivery.send(sender, [recipient], msg.as_string())
    transaction.commit()

src/z/o/zope.sendmail-4.0.0a2/src/zope/sendmail/tests/test_delivery.py   zope.sendmail(Download)
    def testInterface(self):
        from zope.sendmail.interfaces import IQueuedMailDelivery
        from zope.sendmail.delivery import QueuedMailDelivery
        delivery = QueuedMailDelivery('/path/to/mailbox')
        verifyObject(IQueuedMailDelivery, delivery)
        self.assertEqual(delivery.queuePath, '/path/to/mailbox')
 
    def testSend(self):
        from zope.sendmail.delivery import QueuedMailDelivery
        delivery = QueuedMailDelivery('/path/to/mailbox')

src/z/o/zope.sendmail-4.0.0a2/src/zope/sendmail/tests/test_queue.py   zope.sendmail(Download)
    def setUp(self):
        from zope.sendmail.delivery import QueuedMailDelivery
        from zope.sendmail.maildir import Maildir
        self.dir = mkdtemp()
        self.queue_dir = os.path.join(self.dir, "queue")
        self.delivery = QueuedMailDelivery(self.queue_dir)