简体   繁体   English

如何使模板联系表格发送到我的电子邮件

[英]How to make a template contact form send to my email

I have been trying to figure this out all night, but nothing I try seems to be working. 我一直想通宵达旦,但我尝试的一切似乎都没有效果。

I need to make it so this contact form will submit to my email address. 我需要填写,因此此联系表将提交到我的电子邮件地址。 What should I edit or create? 我应该编辑或创建什么?

Here's my html code. 这是我的html代码。

<div class="container">
    <h2>Contact Form</h2>

    <div class="content">
      <form role="form">
        <div class="form-group">
          <label for="exampleInputName"><i class="icon-tag"></i></label>
          <input type="text" class="form-control" id="exampleInputName" placeholder="Full Name" required>
          <div class="clearfix"></div>
        </div>
        <div class="form-group">
          <label for="exampleInputEmail1"><i class="icon-inbox"></i></label>
          <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email" required>
          <div class="clearfix"></div>
        </div>
        <div class="form-group textarea">
          <label for="exampleInputMessage"><i class="icon-pencil"></i></label>
          <textarea rows="6" class="form-control" id="exampleInputMessage" placeholder="Write Message" required></textarea>
          <div class="clearfix"></div>
        </div>

        <button type="submit" class="btn color">SEND MESSAGE</button>
      </form>         
    </div>
  </div>
 </div>

You need to set the form action to a file that processes form data, if you don't know how try something like http://www.tectite.com/ (I'm not involved with them but they look OK at a glance.) 如果您不知道如何尝试使用http://www.tectite.com/之类的东西,则需要将表单操作设置为处理表单数据的文件(我不参与其中,但一眼看上去就可以了。)

The better option is to host the form processor on your own server but that's a bit more technical. 更好的选择是将表单处理器托管在您自己的服务器上,但这要更具技术性。

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

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