github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/containers/ddev-webserver/ddev-webserver-base-files/var/www/html/test/test-email.php (about) 1 <?php 2 3 ini_set( 'display_errors', 1 ); 4 error_reporting( E_ALL ); 5 $from = "Test Mail <from@mail.test>"; 6 $to = "to@mail.test"; 7 $subject = "PHP Mail Test"; 8 $message = "This is a test to check the PHP Mail functionality"; 9 $headers = "From: " . $from; 10 $result = mail($to, $subject, $message, $headers); 11 if ($result == TRUE) { 12 echo "Test email sent"; 13 } else { 14 echo "Failed to send test email"; 15 }