POP3/IMAP direct implementation in Javascript
Is there any way, how to communicate with POP3/IMAP server.
For example for build a pure-JavaScript e-mail notifier?
I've found this: ftp://ftp.activexperts-labs.com/samples/aemail/HTML/POP3/index.htm
Unfortunately it uses the ActiveX objects, which really doesn't work in 开发者_如何学Cmany modern browsers.
It would be nice to have ability to send a packet through any protocol (= not only HTTP/S) in HTML5.
It is not possible with purely browser-based Javascript: there are is no direct socket connection support in browser Javascript. You can use special extensions in things like Firefox's Extension environment to do pure socket connections, but not in a standard browser JS file.
My guess would be that the Same Origin Policy implemented in all recent browsers would slap you in the face for this. I'd simply add a server-side layer to mediate between JSON/AJAX and POP3/IMAP - roughly what gmail does.
精彩评论