<?php
$to = "to@youremail.com";
$subject = "Test email";
$message = "This is a test email.";
$from = "from@youremail.com";
$headers = "From:" . $from;
if (mail($to, $subject, $message, $headers)) {
echo("Your message has been sent successfully");
} else {
echo("Sorry, your message could not be sent");
}
?>
How to check php email is working or not on the server?
Ad comes here
PHP blog
Comments
Leave A Comment