我有以下用于发送邮件的代码:
$email_to = 'someone@somewhere.com';
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers = 'From: ' . $name . ' <' . $email_to . '>' . "\r\n" . 'Reply-To: ' . $email;
if(mail($email_to, $subject, $message, $headers)) {
echo 'sent'; // sending this text to the ajax request telling it that the mail is sent..
} else {
echo 'failed'; // ... or this one to tell it that it wasn't sent
}
邮件发送正常,但我需要在消息中显示电话号码。我相信这很容易解决,我会全力以赴!当有人教我的时候,让我们结束吧!:)