I've set up a contact form in the Greet Us page in http://swedsb.com
When I submit the form, it says mail sent successfully. But I'm not getting the mail, checked the spam folder.
I've set a similar form at http://ibsolutions.in. It is working perfectly.
Been breaking my head for the past 4 hours. Here's my contact.php
<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = $_POST['posRegard'];
$name = $_POST['posName'];
$email = $_POST['posEmail'];
if ( preg_match( "/[\r\n]/", $posName ) || preg_match( "/[\r\n]/", $posEmail ) ) {
header( 'Location: http://swedsb.com/' );
}
$message = $_POST['posText'];
$body = "$name has sent you a greeting. \n E-Mail: $email\nMessage:\n $message";
mail($to, $subject, $body);
header( 'Location: http://swedsb.com/' );
}
else {echo "blarg!";}?>