Re: [Twisted-Python] Need working examples of imap4 client.

2009-07-02 Thread Pywinder Singh
A very belated reply... Thanks again for the code. From there, I was able to make a tool to clone imap mailboxes from server to server. Right now, it's a beast held together with rubber bands, and completely ignores use of a lot of other twisted practices and conveniences (application, connection

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-12 Thread Pywinder Singh
Alex, That link was invaluable. Twisted docs + project deadlines + my own ignorance = I completely had the wrong idea about how to set up SSL. Code worked like a charm, and now I'm very happy not to have to finish the project using python's native imaplib. I'll certainly share the fruits of my l

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-12 Thread Alex Clemesha
Hi, I've wondered myself how to do this, so thanks Phil. I extended Phil's solution to work with Gmail, which boils down to using SSL and setting the correct servername and port, see here: http://gist.github.com/128521 Pywinder, you should be able to just change the username/password and it will

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-11 Thread Pywinder Singh
Tarjei, Yep. I actually grabbed it, but on perusal, but its use of twisted seemed a little too layered to help me at my current twisted expertise. Of course, now that I think I have the problem narrowed down to the login phase, it might help. Tnx. Tarjei wrote: > On 06/11/2009 02:03 AM, Pywinde

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-11 Thread Pywinder Singh
Phil, Much obliged. Was able to isolate and confirm that the real issue is that login is hanging for some reason, and causing the timeout message. I suspect SSL/TLS issues, which at least gives me a decided place to start investigating. Thanks again for the code, it was sanity inducing to say th

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-11 Thread Phil Mayers
Pywinder Singh wrote: > > Ideally, I'd love to see a snipped which is able to log into an imap > server and gets a list of mailboxes. If the example on the site works Here you go: #!/usr/bin/python from twisted.internet import reactor, protocol, defer from twisted.mail import imap4 # change

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-11 Thread tarjei
On 06/11/2009 02:03 AM, Pywinder Singh wrote: > Can someone point me to a working example of imap4 client? > > I've tried the example off the site, code from Abe Fettig's book, and > every example I could find on the web. (most of them seem outdated, as > do most discussions I've found on the subje

[Twisted-Python] Need working examples of imap4 client.

2009-06-10 Thread Pywinder Singh
Can someone point me to a working example of imap4 client? I've tried the example off the site, code from Abe Fettig's book, and every example I could find on the web. (most of them seem outdated, as do most discussions I've found on the subject) All of them invariably end with: twisted.internet