Hello,
I’m currently building a contact form, but I have one problem, all email is sent directly to my hotmail spam folder,
I’ve read an article or 2 about php headers, but since my php knowledge is very little I didnt tackle the problem.
I was also wondering if it is possible to style the sent e-mail?
Here’s the code
[php] <?php
$name = $_POST[‘name’];
$email = $_POST[‘email’];
$message = $_POST[‘message’];
$from = ‘From: Epic Concepts’;
$to = ‘[email protected]’;
$subject = ‘Hello’;
$human = $_POST[‘human’];
$body = "$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>';
}
}
?>[/php]
Thanks for in the advance,
Much regards,
Quincy