Created
April 15, 2017 05:05
-
-
Save wykydtronik/dd63a34c7b05229ca01ec464b669814e to your computer and use it in GitHub Desktop.
testing mail() on apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$to = "test@email.com"; | |
$header = "From: {$to}"; | |
$subject = "Test Subject Here"; | |
$body = "Hi this is a test email to see if the mail() function is working properly on your site."; | |
if (mail($to, $subject, $body, $header)) { | |
echo ("<p>Message successfully sent!</p>"); | |
} else { | |
echo("<p>Message delivery failed...</p>"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment