我想知道如何设置 $body =" 部分的样式,以便我收到的电子邮件更易于阅读。
我已经尝试了一些东西,比如添加标签或正文标签,但似乎都不起作用,请帮我解决这个烦人的问题,
多多的问候,
昆西
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$from = 'From: info@epicconcepts.nl';
$to = 'info@epicconcepts.nl';
$subject = 'Contact formulier bericht';
$human = $_POST['human'];
$headers = "From: " . strip_tags($_POST['req-email']) . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "\r\n";
$headers .= "CC: quincynorbert@live.nl\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$body = "
New Mail $name\n $email\n \n $message";
if ($_POST['submit']) {
if ($name != '' && $email != '') {
if ($human == '4') {
if (mail ($to, $subject, $body, $from)) {
echo '<p class="correct-message">Your message has been sent!</p>';
} else {
echo '<p class="correct-message">Something went wrong, go back and try again!</p>';
}
} else if ($_POST['submit'] && $human != '4') {
echo '<p class="correct-message">You answered the anti-spam question incorrectly!</p>';
}
} else {
echo '<p class="correct-message">You need to fill in all required fields!</p>';
}
}
?>