开发者

How do I send an email from a form? [closed]

开发者 https://www.devze.com 2023-03-27 03:28 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

This is what my code looks like and I can't get it to send to my email and I don't know how to do it?

<form id="contacts-form" action="">
  <fieldset>
    <div class="field">
      <label>Your Name:</label>
      <input type="text" value=""/>
    </div>
    <div class="field">
      <label>Your E-mail:</label>
      <input type="email" value=""/>
    </div>
    <div class="field">
      <label>Your Website:</label>
      <input type="text" value=""/>
    </div>
    <div>
      <label>Your Message:<开发者_运维百科;/label>
      <textarea cols="1" rows="1"></textarea>
    </div>
    <div class="alignright">
      <a href="#" onClick="document.getElementById('contacts-form').submit()">
        Send Your Message!
      </a>
    </div>
  </fieldset>
</form>


You need a back-end that will send the email and you need to tell your form where to send its information. Try this tutorial (which uses php) to learn how to do it. There will be plenty of tutorials in other languages, but you can't do this with html alone.


You need to do some server side coding. Here is a link to a page I found http://www.perlfect.com/articles/sendmail.shtml on how to do it using Perl. But pick your favorite programming language and you will find examples on how to send code.

Whatever you code it in the action in our form will point to the script that will accept the fields and send the email.

0

精彩评论

暂无评论...
验证码 换一张
取 消