本文整理匯總了Python中repoze.sendmail.delivery.QueuedMailDelivery.processor_thread方法的典型用法代碼示例。如果您正苦於以下問題:Python QueuedMailDelivery.processor_thread方法的具體用法?Python QueuedMailDelivery.processor_thread怎麽用?Python QueuedMailDelivery.processor_thread使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類repoze.sendmail.delivery.QueuedMailDelivery
的用法示例。
在下文中一共展示了QueuedMailDelivery.processor_thread方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: createQueuedDelivery
# 需要導入模塊: from repoze.sendmail.delivery import QueuedMailDelivery [as 別名]
# 或者: from repoze.sendmail.delivery.QueuedMailDelivery import processor_thread [as 別名]
def createQueuedDelivery():
delivery = QueuedMailDelivery(queuePath)
handler('registerUtility', delivery, IMailDelivery, name)
mailerObject = queryUtility(IMailer, mailer)
if mailerObject is None:
raise ConfigurationError("Mailer %r is not defined" %mailer)
if processorThread:
qp = QueueProcessor()
qp.mailer = mailerObject
qp.queue_path = queuePath
delivery.processor_thread = qp.send_messages_thread()