How to get email from IMAP server using ajax

I would like to know where to start if I would like to create my own email client based on HTML and JS.

Basically, is it possible to receive email from a server using only AJAX, JS, JQuery, etc.

The client will not be hosted on the server on which the email is sent, but if there is a problem with Cross-Orign requests, I can handle this with CORS.

I could not find the answer to my question even after searching.

Thank you in advance

+4
source share
1 answer

You cannot connect directly to the IMAP server using only the javascript browser. The browser cannot connect IMAP. You will need at least a server-side proxy / application that can translate your HTTP HTTP requests into IMAP requests over the Internet. However, every webmail client I have ever seen uses a tiered architecture with browser code that provides a user interface, a web application server that provides business logic, and in your case, external email accounts that provide most of the data.

+3
source

Source: https://habr.com/ru/post/1483421/


All Articles