Javascript IMAP 和 SMTP 客户端?

2022-01-17 00:00:00 imap smtp ssl javascript

是否可以构建一个可以在只使用 Javascript 的浏览器中运行的 SMTP/IMAP 客户端?

Is it possible to build a SMTP/IMAP client that can run in the browser that uses only Javascript?

推荐答案

目前无法在浏览器中的普通 Web 应用程序中执行此操作.但是,可以在可访问特权 API 的打包应用程序中执行此操作:

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 应用程序使用新兴的 W3C 标准 TCPSocket
  • Chrome 应用使用专有 API chrome.socket

如果您正在寻找久经考验的库,whiteout.io 开发并维护一个在纯 JS 中经过充分测试的 IMAP/SMTP/MIME 编解码器实现:emailjs.

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.

它已获得 MIT 许可,可免费使用.

It's MIT licensed and free to use.

相关文章