- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在编辑 HTML 模板,需要联系表单部分的帮助。我想做到这一点,当用户点击发送消息按钮时,默认的电子邮件客户端(在我的例子中是 Outlook)打开,电子邮件的名称、主题和正文都预先填充了表单中的值。我该怎么做?
联系表单标记:
<div id="footer" class="container">
<header>
<h2>Questions or comments? <strong>Get in touch:</strong></h2>
</header>
<div class="row">
<div class="6u">
<section>
<form>
<div class="row half">
<div class="6u">
<input name="name" placeholder="Name" type="text" class="text" />
</div>
<div class="6u">
<input name="Subject" placeholder="Subject" type="text" class="text" />
</div>
</div>
<div class="row half">
<div class="12u">
<textarea name="message" placeholder="Message"></textarea>
</div>
</div>
<div class="row half">
<div class="12u">
<a href="#" class="button button-icon icon icon-envelope">Send Message</a>
</div>
</div>
</form>
</section>
</div>
<div class="row">
<ul class="icons 6u">
<li class="icon icon-home">
<h6> 1235 street <br />
city, state 0000<br /> </h6>
</li>
<li class="icon icon-phone">
<h6>(000) 000-0000 </h6>
</li>
<li class="icon icon-envelope">
<a href="mailto:hello@hello.com">hello@hello.com</a>
</li>
</ul>
</div>
</div>
</div>
最佳答案
如果我没理解错的话,您可以使用 mailto 链接在电子邮件客户端中打开时预定义消息的正文和电子邮件。
<a href="mailto:hello@hello.com?subject=Email Subject&body=Contents of email">hello@hello.com</a>
AJAX 表单可能更合适,因为用户不需要电子邮件客户端来打开链接。
关于HTML 邮寄表单 : prefill subject and body,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17996602/
我有一个简单的 post 表单,将数据从一个页面发送到另一个页面,但是当我按下提交时,process.php 说没有输入用户名和密码。我觉得我错过了一些非常明显的东西。我在这里做错了什么? 登录.ph
当过去 24 小时重复填写某个值时,我试图让自己在每晚 0:01 使用 cronjob 发送一封电子邮件。 到目前为止我所拥有的是: $query = "SELECT id, detection.nu
我想使用 JSP 发送 HTML 文件。但问题是.. 1) 当我们开发任何 HTML 文件时,我们都会提到一些 CSS 和 JavaScript 文件。 2) 因此,当我发送文件时,它缺少我在其他页面
有人可以指出我在这里做错了什么吗?在 W3c 验证器上我得到这个错误: Line 104, Column 43: Bad value mailto:?subject=Test&body=I found
我必须向 api 端点发出 post 请求,但我收到错误状态 500。 name: "HttpErrorResponse" ok: false status: 500 statusText: "Int
我必须用 Ruby 编写一个电子邮件导入程序,我偶然发现了 Ruby 1.9 的非常漂亮的 Mail gem。我知道如何遍历未读消息,但我不知道如何将它们标记为已读(文档很详尽,但我真的不知道要注意什
虽然有很多相同的问题,但没有一个解决方案对我有用。仅当有只有一个 收件人时才会发送邮件,否则会生成以下错误。此外,我只发送内部电子邮件,不发送外部电子邮件。 有什么想法吗? 代码: $to = 'on
使用 JavaMail API 和 IMAP,我想知道邮件已从文件夹 a 移动到 b。我怎样才能在不添加听众的情况下做到这一点?我的意思是我想在登录帐户并打开文件夹时发现消息的变化。 问题是,如果文件
今天只是一个接一个的问题。我刚刚部署到我的生产服务器并对其进行测试,每当涉及电子邮件时都会出现问题。特别是对于 Devise 的可确认注册电子邮件,每当我注册一个帐户时,日志中都会抛出以下错误...
我是一名优秀的程序员,十分优秀!