Is it possible to build a SMTP/IMAP client that can run in the browser that uses only Javascript?
Javascript IMAP and SMTP client? [closed]
Asked Answered
It's currently not possible to do in a normal web app in the browser. It is however possible to do in packaged apps with access to privileged APIs:
- Firefox Apps use the emerging W3C standard TCPSocket
- Chrome Apps use a proprietary API chrome.socket
If you're looking for a battle-proven library, whiteout.io develops and maintains a well-tested IMAP / SMTP / MIME-codec implementation in pure JS: emailjs.
It's MIT licensed and free to use.
Note to those (like me) looking to do this in a web page: this only works with Firefox the OS (not Firefox the browser) and Chrome extensions. –
Alyosha
I contacted Andris Reinman a few days ago and he confirmed that "BrowserBox supports the latest versions of the browsers" when I asked him which versions of Firefox, Chrome and MSIE it supports. –
Selenium
From whiteout.io: As of January 1st 2016 the Whiteout Mail service is no longer available. –
Guild
Agree with Daniel, its not possible in javascript.
There is a new WebSockets API that's going to be added to browsers to allow communication over sockets, but even after that is introduced it will NOT be possible. WebSockets API goes to great lengths to ensure such a thing is not possible, because it is a security risk.
What is the risk? I keep reading this but I can't get it. Is it all about the handshake? –
Penitential
@themihai, the key risk, I believe, is phishing - or the art of gaining access to privileged information through appearing genuine or passing for other websites. Or spamming, that too. –
Diametral
© 2022 - 2024 — McMap. All rights reserved.
eval()
function won't do it however. – Magdalenemagdalenian