Chapter 11 - Test mail()

Generic call to test if the mail() functionality is properly working.

Output
disabled to prevent spam
Source
<?php //testmail.php from localhost using Mercury Mail in XAMPP
$to = "noreply@ashlietaylor.com";
$subject = "Test message using localhost";
$body = "This is a test message sent through Mercury Mail in XAMPP on localhost.";
$header = "From:postmaster@localhost";

echo "disabled to prevent spam"

// if(mail($to,$subject,$body,$header)) {
// 	echo "Message successfully sent.";
// } else {
// 	echo "Message not sent - check your settings!";
// }
?>