我試圖將form
數據發送到電子郵件,但它無法正常工作。這是我到目前爲止:PHP電子郵件問題
<?php
$to = "[email protected]";
$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!";
}
?>
而......你的問題是什麼? – Mike
我的代碼有什麼問題,爲什麼它不起作用 –
定義「不起作用」 – Mike