HTML mailto表单 [英] HTML mailto form

查看:47
本文介绍了HTML mailto表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以通过我正在建立的网站的反馈表来帮助我吗?运行此程序时,虽然实际上根本不发送任何电子邮件,但我没有收到任何错误.以下是我尝试使用的代码:

Can anyone help me with my feedback form for a website I am building? I am not receiving any errors when I run this, although it doesn't actually send any email at all. The following is the code I am trying to use:

<form action="mailto:admin@example.com" enctype="text/plain" method="post">
<p>Name: <input name="Name" type="text" id="Name" size="40"></p>
<p>E-mail address: <input name="E-mail" type="text" id="E-mail" size="40"></p>
<p>Comment:</p>
<p><textarea name="Comment" cols="55" rows="5"
id="Comment"></textarea></p>
<p><input type="submit" name="Submit" value="Submit"></p>
</form>

推荐答案

HTML表单发送邮件不是正确的选择,您正在使用 HTTP方法(POST),因此您必须从操作值中设置 http/https 链接.否则,您必须使用 href 标签(包括主题和正文参数)发送电子邮件.

Sending mail from HTML Form is not a right option to do, you are using an HTTP Method (POST), so you have to set a http/https link from your action value. Otherwise, you have to send the email using the href tag, including a subject and body parameters.

例如:< a href ="mailto:admin@example.com?subject = SUBJECT& body = MESSAGE">发送消息</a>

单击该链接后,将自动打开安装在计算机中的邮件应用程序.(Outlook,Gmail等),您可以选择在其中发送邮件的程序.

The mail application installed in your machine would automatically opened when you click that link.(Outlook, Gmail,...) and you can choose which one you have to send the mail within it.

这篇关于HTML mailto表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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