我希望我的表单向我发送一封电子邮件,但我不确定在哪里/如何对 html 进行编码,以便表单中的所有字段都填充电子邮件。或者,这真的应该转到服务器端的页面吗?
这是我现有的代码。你能告诉我如何解决吗?
<!-- Contact Section -->
<div class="section contact" id="contact">
Contact
<h2>Say hello</h2>
<p>Whether you have a communication need to be fully developed, or a quick question for a no-charge opinion or assesment, share the goods here.</p>
<form action="sendEmail.php" method="POST" class="myForm clearfix" autocomplate="off">
<div class="form-field">
<label for="name">Name</label>
<input type="text" id="name">
</div>
<div class="form-field">
<label for="issue">Describe your issue or opportunity </label>
<textarea name="issue" cols="30" rows="10"></textarea>
</div>
<div class="form-field">
<label for="file">Attach a file</label>
<input type="file" id="file">
</div>
<div class="form-field">
<label for="email">Email</label>
<!-- <input type="text" id="email"> -->
<input type="email" name="emailAddress" placeholder="Please enter your email address">
</div>
<div class="form-field">
<label for="phone">Phone </label>
<input type="text" id="phone">
</div>
<div class="form-field">
I prefer to be contacted by:
Email <input type="radio" name="contact" value="email">
Phone <input type="radio" name="contact" value="phone">
<!-- <form method="post" action="mailto:info@whatshouldisay.ca" >
<input type="submit" value="Submit form" /> -->
<input type="submit" value="Submit" -->
</div>
</form>
</div>