可以使用HTML5发送客户端电子邮件吗? [英] Can I use HTML5 to send a client-side email?

查看:211
本文介绍了可以使用HTML5发送客户端电子邮件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在HTML5中发送电子邮件。我不想强制用户打开一个邮件客户端,我想直接从网页发送电子邮件。



在附注中有没有在JavaScript中完全可以这样做?我知道这可能是不可能的,只是想知道是否有任何狡猾的方式将其完全脱离客户端。

解决方案

是的,这是可能的。但不实用**请参阅编辑2



某些HTML5实现包括对Websockets的支持,实质上是一个到服务器的tcp连接。实际上看起来像nodejs和websocket支持已被用来实现一个smtp客户端 ...看到这里...



您仍然需要一个smtp服务器,用户名,密码等,就像一个标准的smtp客户端,以使其正常工作。



使用这种垃圾邮件的方法是不太可能,您的smtp提供商可以轻松取消您的帐户。



===编辑===



其实你可以构建一个服务器较少的版本,它也必须实现名称服务器查找来查找mx记录。然而,有可能任何体面的SMTP服务器维护垃圾邮件列表黑名单表,并从随机IP地址连接将看到通常标记为垃圾邮件的邮件。



还要与smtp服务器通话安全的邮件连接可能很困难。



正如其他人所说,这种实现的恶意用途就像发送垃圾邮件。我想这可能是一个HTML5僵尸网络的创建者,但我会以为你会知道大部分这个已经是:)



===编辑2 ===



由于Mark在Ramp51中提到,握手需要使用websockets。这是我不知道的事情。你必须劫持websocket的实现来绕过握手。



正确的方法是让网络服务器转发电子邮件。


I want to send an email in HTML5. I don't want to force the user to open a mail client, I want to send the email directly from the web page.

On a side note, is there any way at all to do this in JavaScript? I know it's probably not possible, just wondering if there are any crafty ways to pull it off going completely through the client.

解决方案

Yes it is possible. But not practical ** See Edit 2

Some HTML5 implementations include support for websockets, essentially a tcp connection to a server. Overlay some send/recv code and you can build a SMTP client.

In fact it looks like nodejs and websocket support has been used to implement a smtp client ... see here ...

You would still need a smtp server, username, password, etc just like a standard smtp client in order for it to work.

Using this method for spam would be unlikely as your smtp provider could easily cancel your account.

=== EDIT ===

Actually you could build a server less version, it would have to also implement name server lookups to find mx records. Chances are however that any decent SMTP servers maintain spamlist blacklist tables and connecting from an random ip address would see the email commonly marked as spam.

Also talking to smtp servers that require secure mail connections could be difficult.

As others have mentioned there are malicious uses to this implementation like sending spam. I guess it is possible you could be a HTML5 botnet creator but I would have thought that you would know most of this already :)

=== EDIT 2 ===

As Mark At Ramp51 mentioned, Handshaking is required with websockets. This was something I wasn't aware of. You would have to hack the websocket implementation to bypass handshaking.

The correct way is to have the web server forward the email.

这篇关于可以使用HTML5发送客户端电子邮件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆