Skip to content

Instantly share code, notes, and snippets.

@faaezahmd
Created August 12, 2017 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faaezahmd/fe57eae9cac6a4969a0fa9e3235ada40 to your computer and use it in GitHub Desktop.
Save faaezahmd/fe57eae9cac6a4969a0fa9e3235ada40 to your computer and use it in GitHub Desktop.
Script to test php mail functionality
<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "TEST@YOURDOMAIN.COM";
$to = "TEST@YOURDOMAIN.COM";
$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