php mail... I did this ages before but I'm having problems with it.
Can anyone explain why this won't work. I keep getting my "error" echo.
Code:
<?php
//--- Start mail script ---
$to = "address@gmail.com";
$from = "address@gmail.com";
$subject = "Please work";
$body = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.";
$header = "Blah blah";
$success = mail($to, $subject, $body, $header);
if(!$success) {
echo "error";
} else {
echo "success";
}
//--- End mail script ---
?>
Comment