Magento Engineer
social
Journal

How to check php email is working or not on the server?

<?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");
}
?>

Ad comes here
Comments
Leave A Comment
PHP blog
Update Cookies Preferences