[Twisted-Python] POP3 Client

Ofir Reichenberg ofir_r at hotmail.com
Mon Apr 12 10:45:52 EDT 2004

>From: <exarkun at divmod.com>
>Subject: Re: [Twisted-Python] POP3 Client
> > I've been trying to build a simple POP3 client using Twisted and 
have had no
> > luck.
> > I'm looking for something that retrieves the list of headers 
waiting on the
> > server.
>   There is a much nicer POP3 client class in Quotient (which needs to 
be folded back into Twisted ... when I get the time).  I highly recommend 
using it instead:

This looks exactly like what I need. Thanks a lot.

> >
> > It appears that to do that I need to build a POP3 factory based on 
a domain.
> > How can I build a domain ojbect for a "real" internet 
domain? (as opposed to
> > a local server)
>   I'm not sure what you mean here.  What you want to do is something 
along these lines:
>     from twisted.internet import protocol
>     from wherever import POP3Client
>     class MyPOP3Client(POP3Client):
>         # Override some callbacks, like connectionMade or perhaps 
>     f = protocol.ClientFactory()
>     f.protocol = MyPOP3Client
>     from twisted.internet import reactor
>     reactor.connectTCP('internet.host.name', 110, f)
>     reactor.run()
>   The above can be run just like any other Python program (it won't 
work, of course, as it is an incomplete example).  As alternatives to the 
last three lines, you can use twisted.application and the utility program 
"twistd" instead.

Hmmm, I see what you mean.
I didn't know of the ClientFactory class.
This was the answer to my question, but I'll give Quotient a try first. :)

Thanks again,

STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 

More information about the Twisted-Python mailing list