Is there a toolkit that will provide a web-based API (xmlrpc, REST, whatever) to remote IMAP servers?
Asked Answered
C

2

7

I'm working on a Google App Engine project that needs to access IMAP. Context.IO isn't quite powerful enough for my purposes, but I'd like something in the same spirit: I want to log into, access, and manipulate hundreds of IMAP mailboxes from within Google App Engine, using either a third-party service or an application server I put on a dedicated hosting server.

As you might imagine, this is mostly to work around the opening sockets limitation in GAE.

Any recommendations?

Consols answered 19/10, 2011 at 20:28 Comment(0)
I
1

I don't know of any pre-made solution, but rolling your own shouldn't be very difficult or take too long. You can build on IMAPClient and SimpleXMLRPCServer on the server and use xmlrpclib on the client.

You would need to think about a way to retain state between calls though, since XmlRPC is a connectionless protocol (as most other RPC mechanisms are as well) and implement some form of service authentication. I have written a class inherited from SimpleXMLRPCServer, which supports SSL connections and HTTP Basic Auth (xmlrpclib already has support for both items). If you're interested in the code, give me a shout.

Illimani answered 22/1, 2012 at 14:34 Comment(1)
Thanks. That's actually what I ended up doing, though I used gocept's object-oriented IMAP implementation.Consols
W
0

Have a look at Mailgun; it offers a robust API and supports IMAP V4.*

* IMAP mailboxes are on Mailgun

Wisdom answered 21/10, 2011 at 7:50 Comment(1)
Thanks for the link. Almost. Unfortunately while mailgun appears to support reading mailboxes it hosts, there isn't a function to go access arbitrary ones out on the web.Consols

© 2022 - 2024 — McMap. All rights reserved.