我没有收到任何电子邮件。 " name"," email"," message"是正确的名字。 我是否必须使用提交按钮执行某些操作?
<input type="submit" name="submit" value="Submit" />
我认为这可能是个问题
我的托管服务提供商是Godaddy,所以PHP可以运行。
<?php
// Assign the input values to variables for easy reference
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
$to = "aroncea@yahoo.com";
$subject = "Contact Form: $name";
$message = "$message";
$headers = 'From: aroncea@yahoo.com' . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
// Die with a success message
die("<span class='success'><h3>Successfully Sent!</h3> Your message is on its way, we will respond to you shortly.</span>");
?>
<!-- Container (Contact Section) -->
<form action="newcontact.php" method="POST" name='contactform' id='contactform' enctype="text/plain">
<div id="contact" class="container-fluid bg-grey">
<h2 class="text-center">CONTACT</h2>
<div class="row">
<div class="col-sm-5">
<p>Contact us and we'll get back to you within 24 hours. </p>
<p><span class="glyphicon glyphicon-map-marker"></span> Burlington, ON</p>
<p><span class="glyphicon glyphicon-phone"></span> 289-230-4510</p>
<p><span class="glyphicon glyphicon-envelope"></span> aroncea@yahoo.com</p>
</div>
<div class="col-sm-7 slideanim">
<div class="row">
<div class="col-sm-6 form-group">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
</div>
<div class="col-sm-6 form-group">
<input class="form-control" id="email" name="email" placeholder="Email" type="email" required>
</div>
</div>
<textarea class="form-control" id="comments" name="message" placeholder="Comment (not required)" rows="3"></textarea><br>
<div class="row">
<div class="col-sm-12 form-group">
<input type="submit" name="submit" value="Submit" />
</div>
</div>
</div>
</div>
&#13;