简体   繁体   English

发送电子邮件HTML / HTML5

[英]send Email HTML/HTML5

A friend of mine has to send a normal email using ONLY HTML/HTML5 (or CSS/CSS3, but that will be of little use for this problem) for his school. 我的一个朋友只能在学校使用 HTML / HTML5(或CSS / CSS3,但这对这个问题用处不大)发送普通电子邮件。 His classmates already said that can't be done without mailto: etc., but the teacher insisted it was possible. 他的同学已经说过,没有mailto:等不可能完成,但是老师坚持认为是可能的。 What do you guys of Stackoverflow think? 你们Stackoverflow的家伙怎么看? We read about setting up you own smtp-client, but there was no example and we are not experienced with HTML5. 我们读过有关设置您自己的smtp客户端的信息,但没有示例,我们对HTML5也没有经验。

Thanks in advance. 提前致谢。

EDIT: 编辑:

If you guys think you know a way to fool the teacher, for example use ServerSide Scripting without let the teacher know, we'll accept it as well ;). 如果你们认为您知道一种愚弄老师的方法,例如使用ServerSide Scripting而不让老师知道,我们也将接受它;)。

Edit 2: I was unclear in the question; 编辑2:我不清楚这个问题; the prblem is to SEND an email without mailto: etc. using HTML, not an email containing HTML 问题是使用HTML发送不带mailto:的电子邮件等,而不是包含HTML的电子邮件

There used to be cross-protocol hacks based on POSTing a form to a different port. 过去曾经有过基于将表单发布到其他端口的跨协议黑客。 With carefully crafted payload and fault-tolerance on the server side you could make form data appear as a different protocol, eg IRC, SMPT or FTP. 通过在服务器端精心设计的有效负载和容错功能,可以使表单数据显示为其他协议,例如IRC,SMPT或FTP。 This is obvious opportunity for abuse (eg turning every website visitor into a spambot), so these holes have been patched in browsers: 这是明显的滥用机会(例如,将每个网站访问者变成垃圾邮件机器人),因此这些漏洞已在浏览器中修复:

Within intended scope of the standard you can't send an e-mail without server-side help or mailto: protocol. 在标准的预期范围内,如果没有服务器端帮助或mailto:协议,您将无法发送电子邮件。

"HTML5" WebSockets are not raw TCP/IP sockets, so you can't use them to connect to non-WebSockets servers. “ HTML5” WebSocket不是原始的TCP / IP套接字,因此您不能使用它们连接到非WebSocket服务器。 You are not allowed to use port 25 with them, and the handshake required for WebSocket connection is not compatible with the SMTP protocol. 不允许将端口25与它们一起使用,并且WebSocket连接所需的握手与SMTP协议不兼容。

You can send any kind of HTML including HTML5 in a mail. 您可以通过邮件发送任何类型的HTML,包括HTML5。 The problem is, that most mail-clients do not support every kind of HTML message for security purpose. 问题是,出于安全目的,大多数邮件客户端不支持每种HTML消息。

Read this article to have an overview how to format a HTML mail: 阅读本文以概述如何格式化HTML邮件:

http://www.sitepoint.com/code-html-email-newsletters/ http://www.sitepoint.com/code-html-email-newsletters/

General rule: keep it as simple as possible. 一般规则:使其尽可能简单。 Second rule: Test it with a big variety of mail-clients because they can all behave different. 第二条规则:使用各种各样的邮件客户端进行测试,因为它们的行为都不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM