如何修改有关发送电子邮件的脚本contact.php。 已经尝试cpanel但不工作
<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if(!empty($_POST['contact_name']) && !empty($_POST['contact_email']) && !empty($_POST['contact_message'])) {
$to = 'klokolev@gmail.com'; // Replace with your email.
$body = "Name: {$_POST['contact_name']}\n\nEmail: {$_POST['contact_email']}\n\nMessage: {$_POST['contact_message']}";
mail($to, "Contact Form Submission", $body, "From: {$_POST['contact_email']}");
}}?>