本文整理汇总了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()