Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2017 06:47
What would you like to do?
Simple PHP Mail test
# Source:
# Howto: ssh login, then php test-email.php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "emailtest@YOURDOMAIN";
$subject = "PHP Mail Test script";
$message = "This is a test to check the PHP Mail functionality";
$headers = "From:" . $from;
mail($to,$subject,$message, $headers);
echo "Test email sent";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment