[Twisted-Python] smtp.SMTP help

Itamar Shtull-Trauring itamar at itamarst.org
Wed Oct 1 23:26:09 MDT 2003


On Thu, 02 Oct 2003 07:18:51 +0200
Rudy Schockaert <rudy.schockaert at pandora.be> wrote:

> I have been struggling with SMTP also. I noticed that there is a lot 
> changing in that part lately, that's why I was still patient and was 
> just waiting to see some doc pop up on the new way to use SMTP.
> 
> Could someone send a small example of  how to use the news SMTP
> module? Mayby an impementation of what Greg is trying to do would be
> nice.

IIRC it was quite trivial. Make a class MyDelivery implementing
IMessageDelivery, and then

class MySMTP(smtp.ESMTP):
    delivery = MyDelivery()

factory = protocol.ServerFactory()
factory.protocol = MySMTP
reactor.listenTCP(25, factory)

-- 
Itamar Shtull-Trauring    http://itamarst.org/
Available for Python & Twisted consulting




More information about the Twisted-Python mailing list