我正在尝试将form
数据发送到电子邮件,但它无法正常工作。这是我到目前为止所拥有的:
<?php
$to = "someemail@thisplace.com";
$subject = "Contact Us";
$email = $_REQUEST['email'];
$message = $_REQUEST['comment/questions'];
$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers);
if ($sent) {
print "Your Comments/Questions have been sent. Thank You!";
} else {
print "We encountered an error sending your Comments/Questions!";
}
?>