Sending mail from a contact form. Simple but challenging!
- by ekalaivan
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
<?phpif(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = $_POST['posRegard'];
$name = $_POST['posName'];
$email = $_POST['posEmail'];
$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!";}?