Created
August 10, 2018 19:07
-
-
Save macariojames/9c067fc4e62629e707f6d1d8cb02274c to your computer and use it in GitHub Desktop.
Testing php sendmail is working correctly
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 | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
$from = "emailtest@currentdomain.com"; | |
$to = "myemail@currentdomain.com"; | |
$subject = "PHP Mail Test script via currentdomain"; | |
$message = "This is a test to check the PHP sendmail functionality."; | |
$headers = "From:" . $from; | |
if(mail($to,$subject,$message, $headers)) | |
echo "Test email sent from currentdomain."; | |
else | |
echo "Error: Message not sent :-("; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment