开发者

POP3/IMAP direct implementation in Javascript

开发者 https://www.devze.com 2023-03-08 21:34 出处:网络
Is there any way, how to communicate with POP3/IMAP server. For example for build a pure-JavaScript e-mail notifier?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消