Using Javascript to Connect to a Server Using a Protocol Other Than HTTP

Can Javascript be used to connect to a server with a protocol other than HTTP or FILE? Ideally, I would like to connect to the SMTP server using Javascript.

+3
source share
2 answers

Impossible due to browser security restrictions. As far as I know, this can be done in flash or java. Upcoming WebSockets will not help you either.

The best option is probably to call a script on your server that makes socket connections the final destination, i.e. an SMTP server, and then passes the data back to the client via HTTP.

+1

JavaScript-, . , , SMTP . file:// .

JavaScript, node.js, .

, , SMTP script, HTTP .

+1

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


All Articles